Context
In China urges citizens in N. Korea to return home:
The Chinese Embassy in North Korea has advised Korean-Chinese residents to return home amid concern that the North's military provocations may trigger a U.S. attack on the North, according to a source.
The embassy began sending the message on Apr. 20, five days before the North celebrated the 85th anniversary of the Korean People's Army with a show of military power, Radio Free Asia said Tuesday.
Why I'm asking
It is clear that it is illegal for Freedom of Movement for North Korean people to leave as stated in The People’s Challenges.
No Freedom of Movement
It is illegal for the North Korean people to leave their country without the regime’s permission, and the regime attempts to restrict the people’s movement even inside their own country. If you wish to travel to another part of the country, you are supposed to have a specific purpose and obtain permission from your work unit. If you do not live in Pyongyang, the showcase capital where most resources are concentrated, you will likely be denied access. The regime has also forcibly relocated hundreds of thousands of North Koreans to less favorable parts of the country as a form of punishment and political persecution.
(emphasis mine)
and also by Human Rights Watch in their World Report
The government uses threats of detention, forced labor, and public executions to ensure obedience and imposes harsh restrictions on freedom of information and movement. It criminalizes leaving the country without official permission, and in some instances state security services actively pursue North Koreans into China, seeking to detain and forcibly return them.
During Kim Jong-Un’s rule, the government has significantly expanded efforts to stop irregular crossings of North Koreans into China. The government has increased rotations of North Korean border guards, cracked down on brokers who assist people trying to leave, and prosecuted use of Chinese cell phones to communicate with the outside world. North Koreans who left the country in 2014 and 2015 told Human Rights Watch that the government was tracking down and publicly executing border guards who allowed people to cross into China in exchange for bribes.
(emphasis mine)
Question
Does China have an agreement/policy (being N Korea's biggest ally) for such actions to take place (if so, what is it?) or would they have to escape?