| name | ctx-doctor |
| description | Troubleshoot ctx behavior. Runs structural health checks, analyzes event log patterns, and presents findings with suggested actions. |
| allowed-tools | Bash(ctx:*), Read |
Diagnose ctx problems by combining structural health checks with
event log analysis.
When to Use
- User says "doctor", "diagnose", "troubleshoot", "health check"
- User asks "why didn't my hook fire?"
- User says "hooks seem broken" or "context seems stale"
- User says "too many nudges" or "something seems off"
- User asks "what happened last session?"
When NOT to Use
- User wants a quick status check (use
/ctx-status)
- User wants to fix drift (use
/ctx-drift)
- User wants to change hook messages (use
ctx hook message)
- User wants to pause hooks (use
/ctx-pause)
Diagnostic Playbook
Follow this triage sequence:
Phase 1: Structural Baseline
Run ctx doctor --json to get the full structural health report.
ctx doctor --json
Parse the JSON output. Note any warnings or errors.
Phase 2: Event Log Analysis (if available)
If the doctor report shows event logging is enabled, query recent events:
ctx hook event --json --last 100
If the user is asking about a specific hook:
ctx hook event --hook <hook-name> --json --last 20