nikivdev/code · error
fzf not found on PATH – install it to use fuzzy selection.
Error message
fzf not found on PATH – install it to use fuzzy selection.
What it means
In src/ai.rs (~line 1680), a session-context reader resolves the on-disk transcript for a session by provider. For Provider::Codex it calls find_codex_session_file(session_id); if no matching session file exists under the Codex sessions storage it bails with "Session file not found for Codex session <id>". (A parallel branch handles Cursor sessions.)
Source
Thrown at src/agents.rs:344
/// Copy agent instructions to clipboard.
fn copy_agent_instructions(agent_name: Option<&str>) -> Result<()> {
let entries = build_agent_entries()?;
if entries.is_empty() {
println!("No agents available.");
return Ok(());
}
let selected = if let Some(name) = agent_name {
// Find agent by name
entries
.iter()
.find(|e| e.name == name)
.ok_or_else(|| anyhow::anyhow!("Agent '{}' not found", name))?
} else {
// Fuzzy select
if which::which("fzf").is_err() {
bail!("fzf not found on PATH – install it to use fuzzy selection.");
}
match run_agent_fzf_simple(&entries)? {
Some(entry) => entry,
None => return Ok(()),
}
};
// Get agent file content
let content = get_agent_content(&selected.name, selected.path.as_deref())?;
if std::env::var("FLOW_NO_CLIPBOARD").is_ok() || !std::io::stdin().is_terminal() {
println!("Clipboard disabled; skipping copy.");
return Ok(());
}
// Copy to clipboard using pbcopy (macOS) or xclip (Linux)
let mut cmd = if cfg!(target_os = "macos") {
Command::new("pbcopy")View on GitHub (pinned to a747e741ae)
Solutions
- Verify the Codex session id (list existing sessions in the Codex sessions directory, e.g. ~/.codex/sessions) and use an existing one.
- Ensure the Codex sessions storage exists and points at the machine where the session was created; restore from backup if pruned.
- Check the provider argument is actually Codex (a Cursor id will never resolve against Codex storage).
Example fix
// before
let ctx = read_session_context("abc123-not-real", Provider::Codex, None, &project)?;
// after (use a real id from storage)
+ ls ~/.codex/sessions # pick the correct session id
let ctx = read_session_context("0198a7b6-...", Provider::Codex, None, &project)?; Defensive patterns
Strategy: validation
Validate before calling
fn codex_session_exists(id: &str) -> bool {
find_codex_session_file(id).is_some() // or scan ~/.codex/sessions for the id
} Try / catch
match read_session_context(id, Provider::Codex, since, &project) {
Err(e) if e.to_string().contains("Session file not found") => {
eprintln!("session {id} has no stored transcript; use a valid id from ~/.codex/sessions");
}
r => r?,
} Prevention
- Resolve session ids from the provider's own session listing, never by hand.
- Match provider to storage: Codex ids only with Codex lookups.
- Back up or exclude ~/.codex/sessions from cleanup jobs.
When it happens
Trigger: Requesting context since a timestamp for a Codex session id whose corresponding session file cannot be found — invalid/typo'd session id, session from another machine, or Codex sessions directory cleaned/moved (e.g. ~/.codex/sessions absent or pruned).
Common situations: Passing a Cursor-style or made-up id to a Codex lookup; referencing a session after Codex updated its storage layout; disk cleanup removing old session logs; working on a different machine than where the session ran.
Related errors
- failed to resume codex session {}
- Session file not found for Codex session {}
- env file not found: {}
- runtime asset '{}' not found. searched: {}
- jj git export retry loop should always return
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/ca66dedec96b99fb.
Report an issue: GitHub.