{"record":{"id":"ede66c2e354d3a68","repo":"nikivdev/code","slug":"doctor-is-only-supported-for-codex-sessions-use","errorCode":null,"errorMessage":"doctor is only supported for Codex sessions; use `f codex doctor`","messagePattern":"doctor is only supported for Codex sessions; use `f codex doctor`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ai.rs","lineNumber":570,"sourceCode":"            Some(ProviderAiAction::Copy { session }) => copy_session(session, Provider::Cursor)?,\n            Some(ProviderAiAction::Context {\n                session,\n                count,\n                path,\n            }) => copy_context(session, Provider::Cursor, count, path)?,\n            Some(ProviderAiAction::Show {\n                session,\n                path,\n                count,\n                full,\n            }) => show_session(session, Provider::Cursor, count, path, full)?,\n            Some(ProviderAiAction::Runtime { .. }) => {\n                bail!(\n                    \"runtime helpers are only supported for Codex sessions; use `f codex runtime ...`\"\n                );\n            }\n            Some(ProviderAiAction::Doctor { .. }) => {\n                bail!(\"doctor is only supported for Codex sessions; use `f codex doctor`\");\n            }\n            Some(ProviderAiAction::Eval { .. }) => {\n                bail!(\"eval is only supported for Codex sessions; use `f codex eval`\");\n            }\n            Some(ProviderAiAction::TouchLaunch { .. }) => {\n                bail!(\n                    \"touch-launch is only supported for Codex sessions; use `f codex touch-launch`\"\n                );\n            }\n            Some(ProviderAiAction::EnableGlobal { .. }) => {\n                bail!(\n                    \"global Codex enablement is only supported for Codex sessions; use `f codex enable-global`\"\n                );\n            }\n            Some(ProviderAiAction::Daemon { .. }) => {\n                bail!(\"daemon is only supported for Codex sessions; use `f codex daemon ...`\");\n            }\n            Some(ProviderAiAction::Memory { .. }) => {","sourceCodeStart":552,"sourceCodeEnd":588,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/ai.rs#L552-L588","documentation":"The Doctor action (health checks/diagnostics) is implemented only for Codex sessions. run_provider with Provider::Cursor and a Doctor action bails with this message directing the user to `f codex doctor`.","triggerScenarios":"Running `f cursor doctor` (optionally with doctor flags) instead of `f codex doctor`.","commonSituations":"Troubleshooting setup and trying the same doctor command across all providers; docs or onboarding scripts assume `f <provider> doctor` is universal.","solutions":["Run `f codex doctor` for diagnostics","For Cursor issues, use `f cursor list` / `f cursor show` to sanity-check session discovery","Check Cursor CLI installation/config separately from Codex"],"exampleFix":"// before\n$ f cursor doctor\n// error: doctor is only supported for Codex sessions\n// after\n$ f codex doctor","handlingStrategy":"validation","validationCode":"fn assert_codex_for_doctor(provider: &Provider) -> Result<()> {\n    if *provider != Provider::Codex {\n        bail!(\"doctor requires the codex provider\");\n    }\n    Ok(())\n}","typeGuard":"fn supports_doctor(p: &Provider) -> bool { matches!(p, Provider::Codex) }","tryCatchPattern":"if let Err(e) = run_provider(Provider::Cursor, Some(ProviderAiAction::Doctor { .. })) {\n    if e.to_string().contains(\"doctor is only supported\") {\n        eprintln!(\"run diagnostics with: f codex doctor\");\n    }\n}","preventionTips":["Always run health diagnostics via `f codex doctor`","Diagnose Cursor issues via session listing (`f cursor list`) instead","Keep troubleshooting docs provider-specific"],"tags":["cli","unsupported-action","cursor","codex","diagnostics"],"backgroundTag":"provider-unsupported-action","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}