CommandsAgent
city agent doctor
Diagnose and optionally fix stale agent state files
city agent doctor
Diagnose agent state files for a target agent and optionally clean stale pid/meta files.
This page remains as a command entry point. For the fuller explanation, see CLI / doctor and Agent Shows stale.
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 packages/downcity/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