{"record":{"id":"854e3df04e18824d","repo":"nikivdev/code","slug":"connect-is-only-supported-for-codex-sessions-use","errorCode":null,"errorMessage":"connect is only supported for Codex sessions; use `f codex connect ...`","messagePattern":"connect is only supported for Codex sessions; use `f codex connect \\.\\.\\.`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ai.rs","lineNumber":550,"sourceCode":"\n#[derive(Debug, Clone, PartialEq, Eq)]\nstruct PrFeedbackCursorHandoff {\n    workspace_path: PathBuf,\n    review_plan_path: PathBuf,\n    review_rules_path: Option<PathBuf>,\n    kit_system_path: PathBuf,\n}\n\n/// Run a provider-specific action (for top-level `f codex` / `f claude` commands).\npub fn run_provider(provider: Provider, action: Option<ProviderAiAction>) -> Result<()> {\n    if provider == Provider::Cursor {\n        match action {\n            None | Some(ProviderAiAction::List) => list_sessions(Provider::Cursor)?,\n            Some(ProviderAiAction::LatestId { path }) => {\n                print_latest_session_id(Provider::Cursor, path)?\n            }\n            Some(ProviderAiAction::Connect { .. }) => {\n                bail!(\"connect is only supported for Codex sessions; use `f codex connect ...`\");\n            }\n            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            }","sourceCodeStart":532,"sourceCodeEnd":568,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/ai.rs#L532-L568","documentation":"run_provider(Provider::Cursor, ...) dispatches provider AI actions. Cursor sessions only support a subset of actions (list, latest-id, copy, context, show); the Connect action is Codex-only, so requesting `f cursor connect ...` bails with this message directing the user to `f codex connect ...`.","triggerScenarios":"Invoking the CLI with a Cursor provider and a Connect action, e.g. `f cursor connect <session-id>` or `f cursor connect --workspace ...`.","commonSituations":"User habitually uses `f codex connect` and swaps in `cursor` assuming feature parity; scripts parameterized over provider name passing 'cursor' to commands only implemented for Codex; documentation/alias confusion between providers.","solutions":["Re-run the command with the codex provider: `f codex connect ...`","If you need connection features for Cursor sessions, check whether list/copy/context/show cover your need (`f cursor list`, `f cursor show`)","Fix scripts/templates that substitute the provider name blindly into subcommand names"],"exampleFix":"// before\n$ f cursor connect <session-id>\n// error: connect is only supported for Codex sessions\n// after\n$ f codex connect <session-id>","handlingStrategy":"validation","validationCode":"const CURSOR_UNSUPPORTED_ACTIONS: &[&str] =\n    &[\"connect\", \"runtime\", \"doctor\", \"eval\", \"touch-launch\", \"enable-global\", \"daemon\", \"memory\"];\nfn cursor_supports(action: &str) -> bool {\n    !CURSOR_UNSUPPORTED_ACTIONS.contains(&action)\n}","typeGuard":"fn is_codex_provider(p: &Provider) -> bool { *p == Provider::Codex }","tryCatchPattern":"match run_provider(Provider::Cursor, Some(ProviderAiAction::Connect { .. })) {\n    Err(e) if e.to_string().contains(\"only supported for Codex\") => {\n        eprintln!(\"re-run with: f codex connect ...\");\n    }\n    r => r?,\n}","preventionTips":["Check `f cursor --help` before using advanced subcommands","Remember Cursor supports only list, latest-id, copy, context, show","Avoid blind provider-name substitution in scripts","Route all connect/runtime/doctor/eval/daemon/memory operations through codex"],"tags":["cli","unsupported-action","cursor","codex"],"backgroundTag":"provider-unsupported-action","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}