nikivdev/code · warning
No task failures recorded yet.
Error message
No task failures recorded yet.
What it means
`latest_entry` reads the most recent task-failure record via `recent_entries(1)` and errors when the log is empty — there is no failure entry to return. It backs `f last`/`run_last` and `resolve_entry` (the default when no ID is given), so the command cannot proceed without any recorded failure.
Source
Thrown at src/failure.rs:331
}
}
if entries.is_empty() && latest_path.is_file() {
entries.push(load_entry_from_path(&latest_path)?);
}
entries.sort_by(|a, b| b.record.ts.cmp(&a.record.ts).then_with(|| b.id.cmp(&a.id)));
if entries.len() > limit {
entries.truncate(limit);
}
Ok(entries)
}
fn latest_entry() -> Result<FailureEntry> {
recent_entries(1)?
.into_iter()
.next()
.ok_or_else(|| anyhow::anyhow!("No task failures recorded yet."))
}
fn resolve_entry(id: Option<&str>) -> Result<FailureEntry> {
let Some(id) = id else {
return latest_entry();
};
let path_candidate = PathBuf::from(id);
if (path_candidate.is_absolute() || id.contains(std::path::MAIN_SEPARATOR))
&& path_candidate.exists()
{
return load_entry_from_path(&path_candidate);
}
let limit = 200;
recent_entries(limit)?
.into_iter()
.find(|entry| {View on GitHub (pinned to a747e741ae)
Solutions
- Run a task that fails (or fix your workflow) so a failure gets recorded, then retry
- Verify you are in the right workspace/project — the failure log may live elsewhere
- Pass an explicit entry ID if you intended a specific failure rather than the latest
- Check the failure log location/permissions if you believe entries exist
Defensive patterns
Strategy: try-catch
Validate before calling
if recent_entries(1).map(|v| v.is_empty()).unwrap_or(true) {
eprintln!("No failures recorded yet.");
std::process::exit(0);
} Try / catch
match latest_entry() {
Ok(entry) => show(entry),
Err(e) if e.to_string().contains("No task failures recorded") => {
println!("Nothing to show — no failures logged yet.");
}
Err(e) => return Err(e),
} Prevention
- Only query the latest failure after a failing run exists
- Check failure-log emptiness explicitly in scripts
- Run commands from the correct workspace where the log lives
- Treat empty-history as an expected state, not a crash
When it happens
Trigger: Running the 'last failure' command (or omitting an ID so it resolves to the latest entry) before any task failure has ever been recorded in the failure log.
Common situations: Fresh checkout/CI workspace with an empty failure store; after cleaning logs; expecting a failure that never got recorded because prior runs succeeded or logging was skipped.
Related errors
- Missing profile: {}
- Could not find agent file for '{}'
- No prompt provided. Usage: f agents run {} "your prompt here
- connect is only supported for Codex sessions; use `f codex c
- runtime helpers are only supported for Codex sessions; use `
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/9b36b1992a6a297c.
Report an issue: GitHub.