{"record":{"id":"27285f98b742c535","repo":"nikivdev/code","slug":"failed-to-continue-session","errorCode":null,"errorMessage":"failed to continue {} session","messagePattern":"failed to continue (.+?) session","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ai.rs","lineNumber":5499,"sourceCode":"        bail!(\n            \"failed to continue {} session {} for {}\",\n            provider_name(sess.provider),\n            sess.session_id,\n            target.display()\n        );\n    }\n\n    let launched = match provider {\n        Provider::Claude => launch_claude_continue()?,\n        Provider::Codex => launch_codex_continue_last_for_target(None, false)?,\n        Provider::Cursor => false,\n        Provider::All => false,\n    };\n\n    if launched {\n        Ok(())\n    } else {\n        bail!(\"failed to continue {} session\", provider_name(provider))\n    }\n}\n\n/// Quick start: continue last session or create new one with dangerous flags.\npub fn quick_start_session(provider: Provider) -> Result<()> {\n    if provider == Provider::Codex {\n        let launched = launch_codex_continue_last_for_target(None, false)?;\n        if !launched {\n            new_session(provider)?;\n        }\n        return Ok(());\n    }\n\n    // Auto-import any new sessions silently\n    let _ = auto_import_sessions();\n\n    let sessions = read_sessions_for_project(provider)?;\n","sourceCodeStart":5481,"sourceCodeEnd":5517,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/ai.rs#L5481-L5517","documentation":"The generic continue launcher in src/ai.rs:5499 bails when its `launched` flag is false after attempting to start the provider CLI's interactive continue flow. Unlike error 77 this is the no-specific-session path: the picker/launch step simply never started for the given provider (Claude/Codex name is interpolated).","triggerScenarios":"Calling `f ai <provider> continue` (no session id) where the launch branches all fall through to launched=false — e.g. Provider::All reaching the match, or the provider binary missing/launch mechanism failing so no arm sets launched=true.","commonSituations":"Provider CLI not installed or not on PATH; running in an environment where spawning the interactive process fails; passing provider=All into this launcher from an internal call site.","solutions":["Confirm the provider CLI binary is installed and on PATH (claude/codex)","Re-run in an interactive terminal tab so the launch can attach","Use a concrete provider (claude/codex) rather than All","Fall back to `f ai <provider> sessions` to verify sessions exist before continuing"],"exampleFix":"// before\n$ f ai continue  // All -> never launches\n// after\n$ f ai claude continue","handlingStrategy":"fallback","validationCode":"use which::which;\nlet bin = match provider { Provider::Claude => \"claude\", Provider::Codex => \"codex\", _ => return };\nif which(bin).is_err() {\n    eprintln!(\"{} CLI not found on PATH; cannot launch continue.\", bin);\n    return;\n}","typeGuard":"fn continue_supported(p: Provider) -> bool {\n    matches!(p, Provider::Claude | Provider::Codex)\n}","tryCatchPattern":"match continue_last(provider, path) {\n    Err(e) if e.to_string().starts_with(\"failed to continue\") => {\n        eprintln!(\"{e} — falling back to `sessions` listing\");\n        let _ = provider_sessions(provider, path, true);\n    }\n    other => other?,\n}","preventionTips":["Install the provider CLI and confirm it's on PATH","Never pass Provider::All into the continue launcher","Run inside an interactive terminal so the launched process can attach","Verify sessions exist via the listing before attempting continue"],"tags":["cli","launch-failure","provider-cli"],"backgroundTag":"picker-launch-failed","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}