nikivdev/code · error

review failed: no review attempts were available

Error message

review failed: no review attempts were available

What it means

This error is raised by the commit command when the AI review pipeline finished (all attempts exhausted, including timeouts) but collected zero recorded failure messages, meaning no review attempt ever produced a result to report. It prevents the commit from proceeding silently with an unknown review state and forces an explicit failure. It is a guard against a code path where the review loop yielded nothing at all.

Source

Thrown at src/commit.rs:4112

        );
        if let Some(last_error) = review_failures.last() {
            println!("Last review error: {}", last_error);
        }
        ReviewResult {
            issues_found: false,
            issues: Vec::new(),
            summary: Some(format!(
                "Review unavailable; commit proceeded in fail-open mode after {} failed attempt(s).",
                review_failures.len()
            )),
            future_tasks: Vec::new(),
            timed_out: true,
            quality: None,
        }
    } else {
        restore_staged_snapshot_in(&repo_root, &staged_snapshot)?;
        if review_failures.is_empty() {
            bail!("review failed: no review attempts were available");
        }
        bail!("review failed:\n  {}", review_failures.join("\n  "));
    };

    println!("────────────────────────────────────────\n");

    // Log review result for async tracking
    let context_chars = session_context.as_ref().map(|c| c.len()).unwrap_or(0);
    ai::log_review_result(
        &repo_root,
        review.issues_found,
        &review.issues,
        context_chars,
        0, // TODO: track actual review time
    );

    if review.timed_out {
        if review_failed_open {

View on GitHub (pinned to a747e741ae)

Solutions

  1. Check that the review backend (codex/LLM process) is installed, on PATH, and responding; run it manually to verify.
  2. Increase the review timeout configuration if reviews are slow in your environment.
  3. Re-run the commit; transient backend stalls are a common cause.
  4. If review is not needed for this commit, disable review or use the documented skip/override path.

Example fix

// before
f commit --review
// after (skip review when backend unavailable)
f commit --no-review
Defensive patterns

Strategy: retry

Validate before calling

// before committing, check review backend is responsive
// e.g. ensure `codex` answers a cheap ping within your timeout budget

Try / catch

match result {
    Err(e) if e.to_string().contains("no review attempts were available") => {
        // inspect review backend health, then retry the commit
    }
    r => r?,
}

Prevention

When it happens

Trigger: Running the commit flow (e.g. `f commit`) with review enabled when every review attempt was skipped, cancelled, or timed out before recording a failure string into review_failures (e.g. all attempts hit the timed_out:true branch with quality: None).

Common situations: Review backend (LLM/codex) hung and every attempt timed out; review process killed externally; environment where the reviewer binary is unresponsive so no failure text was ever pushed into review_failures.

Related errors


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/04f586102dad6ae8. Report an issue: GitHub.