{"record":{"id":"46c1c8d3fd2f9485","repo":"nikivdev/code","slug":"continue-requires-a-specific-provider-claude-or-c","errorCode":null,"errorMessage":"continue requires a specific provider (claude or codex)","messagePattern":"continue requires a specific provider \\(claude or codex\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ai.rs","lineNumber":5447,"sourceCode":"    }\n\n    resume_session(\n        Some(selected_id.to_string()),\n        Some(target.display().to_string()),\n        Provider::Codex,\n    )\n}\n\nfn continue_session(\n    session: Option<String>,\n    path: Option<String>,\n    provider: Provider,\n) -> Result<()> {\n    if session.is_some() {\n        return resume_session(session, path, provider);\n    }\n    if provider == Provider::All {\n        bail!(\"continue requires a specific provider (claude or codex)\");\n    }\n    ensure_provider_tty(provider, \"continue\")?;\n\n    if path\n        .as_deref()\n        .map(str::trim)\n        .filter(|value| !value.is_empty())\n        .is_some()\n    {\n        let target = resolve_session_target_path(path.as_deref())?;\n        let sessions = read_sessions_for_target(provider, path.as_deref())?;\n        let sess = sessions.first().ok_or_else(|| {\n            anyhow::anyhow!(\n                \"No {} sessions found for {}\",\n                provider_name(provider),\n                target.display()\n            )\n        })?;","sourceCodeStart":5429,"sourceCodeEnd":5465,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/ai.rs#L5429-L5465","documentation":"The continue/resume entry point in src/ai.rs:5447 bails when provider is Provider::All because continuing a session requires knowing which provider CLI to launch. Like the sessions check, generic provider selection is rejected with guidance to pick claude or codex.","triggerScenarios":"Calling continue without a specific provider (e.g. `f ai continue`) and without a --session argument; if a session id was passed the code resumes it instead, otherwise Provider::All hits this bail before ensure_provider_tty.","commonSituations":"Omitting the provider token in the command; scripts or aliases that default the provider to All; new users following outdated docs where continue inferred the provider.","solutions":["Specify the provider: `f ai claude continue` or `f ai codex continue`","If resuming a known session, pass the session id so resume_session handles it","Fix wrapper scripts to default provider to claude or codex, never all"],"exampleFix":"// before\n$ f ai continue\n// after\n$ f ai claude continue","handlingStrategy":"validation","validationCode":"if provider == \"all\" && session_id.is_none() {\n    eprintln!(\"continue requires a provider: `f ai claude continue` or `f ai codex continue`\");\n    std::process::exit(2);\n}","typeGuard":"fn continue_target_valid(p: Provider, session: Option<&str>) -> bool {\n    session.is_some() || matches!(p, Provider::Claude | Provider::Codex)\n}","tryCatchPattern":"match continue_session(provider, session, path) {\n    Err(e) if e.to_string().contains(\"continue requires a specific provider\") => {\n        eprintln!(\"{e}\");\n    }\n    other => other?,\n}","preventionTips":["Always pass claude or codex with continue","Pass --session when you know which session to resume (bypasses the check)","Keep wrapper scripts defaulting to a concrete provider"],"tags":["cli","argument-validation","provider-selection"],"backgroundTag":"missing-required-argument","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}