{"record":{"id":"7bcb39c1dbe003f7","repo":"nikivdev/code","slug":"runtime-helpers-are-only-supported-for-codex-sessi","errorCode":null,"errorMessage":"runtime helpers are only supported for Codex sessions; use `f codex runtime ...`","messagePattern":"runtime helpers are only supported for Codex sessions; use `f codex runtime \\.\\.\\.`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ai.rs","lineNumber":565,"sourceCode":"                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            }\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                );","sourceCodeStart":547,"sourceCodeEnd":583,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/ai.rs#L547-L583","documentation":"The Runtime helper action is implemented only for Codex sessions. When run_provider is called with Provider::Cursor and a Runtime action, it bails with this message pointing the user at `f codex runtime ...`.","triggerScenarios":"Running `f cursor runtime ...` with any runtime subcommand (runtime helpers operate on Codex runtime state).","commonSituations":"User assumes runtime introspection works for all providers; muscle-memory command substitution from codex to cursor; automation enumerating actions per provider without a capability whitelist.","solutions":["Use `f codex runtime ...` instead","For Cursor sessions, limit to supported actions: list, latest-id, copy, context, show","Add provider capability checks to scripts before invoking runtime subcommands"],"exampleFix":"// before\n$ f cursor runtime status\n// error: runtime helpers are only supported for Codex sessions\n// after\n$ f codex runtime status","handlingStrategy":"validation","validationCode":"fn assert_codex_for_runtime(provider: &Provider) -> Result<()> {\n    if *provider != Provider::Codex {\n        bail!(\"runtime helpers require the codex provider\");\n    }\n    Ok(())\n}","typeGuard":"fn supports_runtime(p: &Provider) -> bool { matches!(p, Provider::Codex) }","tryCatchPattern":"if let Err(e) = run_provider(Provider::Cursor, Some(ProviderAiAction::Runtime { .. })) {\n    if e.to_string().contains(\"runtime helpers are only supported\") {\n        eprintln!(\"use: f codex runtime ...\");\n    }\n}","preventionTips":["Use `f codex runtime` for all runtime helper operations","Do not parameterize the provider name into runtime subcommands","List supported Cursor actions before scripting (`f cursor --help`)"],"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"}