{"record":{"id":"aa7e91d24082b3d5","repo":"nikivdev/code","slug":"resolve-is-only-supported-for-codex-sessions-use","errorCode":null,"errorMessage":"resolve is only supported for Codex sessions; use `f codex resolve ...`","messagePattern":"resolve is only supported for Codex sessions; use `f codex resolve \\.\\.\\.`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ai.rs","lineNumber":7933,"sourceCode":"        return Ok(());\n    }\n\n    bail!(\n        \"failed to connect to codex session {} for {}\",\n        row.id,\n        launch_path.display()\n    )\n}\n\nfn resolve_codex_input(\n    path: Option<String>,\n    query: Vec<String>,\n    exact_cwd: bool,\n    json_output: bool,\n    provider: Provider,\n) -> Result<()> {\n    if provider != Provider::Codex {\n        bail!(\"resolve is only supported for Codex sessions; use `f codex resolve ...`\");\n    }\n\n    let (query, json_output) = normalize_codex_resolve_args(query, json_output);\n    let plan = build_codex_open_plan(path, query, exact_cwd)?;\n    record_codex_open_plan(&plan, \"resolve\");\n    if json_output {\n        println!(\n            \"{}\",\n            serde_json::to_string_pretty(&plan).context(\"failed to encode Codex resolve JSON\")?\n        );\n        return Ok(());\n    }\n\n    print_codex_open_plan(&plan);\n    Ok(())\n}\n\npub fn codex_resolve_inspector(","sourceCodeStart":7915,"sourceCodeEnd":7951,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/ai.rs#L7915-L7951","documentation":"This Rust CLI (Flow) supports resolving/looking up sessions for multiple AI providers, but the `resolve` subcommand's underlying session-open logic is implemented only for Codex sessions. When the command is invoked with any other provider selected, the function bails out early with a message pointing the user at the provider-scoped `f codex resolve ...` command.","triggerScenarios":"Calling the generic `resolve` command (e.g. `f resolve <query>`) while the active provider is anything other than Provider::Codex (e.g. provider set to Claude or another backend via flag or config).","commonSituations":"Users with a default non-Codex provider in their Flow config running `f resolve` expecting Codex session lookup; scripts that call `f ai resolve` generically after switching providers; muscle memory from Codex-only versions of the tool.","solutions":["Re-run the command scoped to Codex: `f codex resolve ...`","Switch the active provider to Codex before invoking resolve (e.g. pass the provider flag or update the default provider in the Flow config)","If resolve for another provider is genuinely needed, use that provider's own lookup commands or file a feature request"],"exampleFix":"// before\nf resolve \"fix login bug\"\n// after\nf codex resolve \"fix login bug\"","handlingStrategy":"validation","validationCode":"// Rust: check provider before calling resolve\nif provider != Provider::Codex {\n    eprintln!(\"resolve requires Codex; run `f codex resolve ...` instead\");\n    return Ok(());\n}\nlet result = resolve_session(path, query, exact_cwd, json_output, provider);","typeGuard":"fn is_codex(provider: &Provider) -> bool { *provider == Provider::Codex }","tryCatchPattern":"match resolve_session(&path, query, exact_cwd, json_output, provider) {\n    Ok(()) => (),\n    Err(e) if e.to_string().contains(\"only supported for Codex\") => {\n        eprintln!(\"Hint: use `f codex resolve ...`\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always invoke provider-specific subcommands (`f codex resolve`) rather than the generic form","Check which provider your Flow config defaults to before scripting generic commands","Pin provider explicitly with a flag in scripts instead of relying on config defaults"],"tags":["cli","provider-mismatch","codex"],"backgroundTag":"unsupported-provider-operation","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}