nikivdev/code · error
{} is only supported for Codex sessions; use `f ai codex {}
Error message
{} is only supported for Codex sessions; use `f ai codex {} ...` What it means
Error "{} is only supported for Codex sessions; use `f ai codex {} ...`" thrown in nikivdev/code.
Source
Thrown at src/ai.rs:5738
copy_session_history_to_clipboard(&selected.id, Provider::Codex)?;
println!(
"Session {} found and copied to clipboard",
truncate_recover_id(&selected.id)
);
Ok(())
}
fn find_best_codex_session_match(
path: Option<String>,
query: Vec<String>,
exact_cwd: bool,
scope: CodexFindScope,
provider: Provider,
action_name: &str,
verbose: bool,
) -> Result<CodexRecoverRow> {
if provider != Provider::Codex {
bail!(
"{} is only supported for Codex sessions; use `f ai codex {} ...`",
action_name,
action_name
);
}
let query_text = normalize_recover_query(&query).ok_or_else(|| {
anyhow::anyhow!(
"{} requires a query, for example: `f ai codex {} \"make plan to get designer\"`",
action_name,
action_name
)
})?;
let target_path = path
.map(|value| canonicalize_recover_path(Some(value)))
.transpose()?;
let rows =
search_codex_threads_for_find(target_path.as_deref(), exact_cwd, &query_text, 5, scope)?;View on GitHub (pinned to a747e741ae)
When it happens
Trigger: Thrown at src/ai.rs:5738 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/ac83abc759681c34.
Report an issue: GitHub.