CommandsAgent
city agent doctor
Diagnose and optionally fix stale runtime state files
city agent doctor
Diagnose runtime state files for a target agent and optionally clean stale pid/meta files.
Usage
city agent doctor [path] [--fix]Key option
--fix [enabled]: clean stale state files automatically
Behavior
pathdefaults to current directory.- Target agent must be registered in console registry
- Without
--fix, it only reports issues and does not modify files
Related commands
Example Output (Based on Current Implementation)
The examples below are aligned with current command implementations in package/src (including default output mode and field structure). Placeholder values are used for environment-specific fields.
$ city agent doctor .
city version: 1.0.0
⚠️ Stale daemon state detected
project: <projectRoot>
stalePid: <pid>
reason: <reasons>
log: <daemonLogPath>
Run `city agent doctor <path> --fix` to clean stale pid/meta.$ city agent doctor . --fix
city version: 1.0.0
✅ Cleaned stale daemon pid/meta files