run_doctor
Diagnose Claude Code session issues including corrupted files, oversized content, and orphaned data. Optionally repair detected problems.
Instructions
Full integrity check: detects corrupted JSONL lines, truncated thinking blocks, oversized images/PDFs, sessions over 50 MB, sessions-index drift, orphaned subagent directories, and stale per-session warning state files (the #13518 culprit). Set repair=true to auto-fix everything that's safely repairable.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run_doctor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repair | No | Run safe repairs after diagnosis. Default: false (report only). | |
| allow_deletes | No | Allow deleting orphaned/stale state files when repairing. Default: true. |