You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remote Control cannot start: stale rc.json + recycled PID causes false "running in another process" error #5448
Error: Remote Control is still running in another process on this machine and did not stop in time. Stop it there and try again.
What happened
Enabling Remote Control always failed with the error above, even though no other Kimi Code process on the machine was running Remote Control.
Root cause (confirmed locally)
~/.kimi-code/server/rc.json still contained state from a previous run: {"pid":6252,"nonce":"<redacted>","local_origin":"http://127.0.0.1:4474","device_id":"<redacted>","url":"<redacted>","started_at":1795603644816}
The original Remote Control process had already exited. Its PID (6252) had been recycled by Windows and now belongs to an unrelated sshd.exe, created hours AFTER started_at.
Nothing was listening on 127.0.0.1:4474 anymore.
The app apparently only checks "does this PID exist / can it be stopped", so the recycled PID made it believe Remote Control was still running elsewhere, and stopping it (an unrelated system process) timed out.
Workaround
Renaming ~/.kimi-code/server/rc.json fixed it; Remote Control can then start normally.
Suggested fix
When validating rc.json, verify process identity instead of PID existence alone (e.g. compare process creation time against started_at, check the executable path, or do a nonce/health check against local_origin). If the recorded process is gone or doesn't match, treat the state file as stale and clean it up instead of trying to stop the PID.
Activity