nikivdev/code · warning

Commit aborted after manual fix. Review changes and retry.

Error message

Commit aborted after manual fix. Review changes and retry.

What it means

This error is raised by `warn_secrets_in_diff` after a manual (user-driven) fix round: a secret-scan re-run came back clean, the user was asked 'Secret scan is clean after manual fix. Continue with commit?' and declined, so the library aborts the commit. It signals the commit flow ended by explicit user choice and changes still need review before retrying.

Source

Thrown at src/commit.rs:404

        );
        eprintln!("Suggested prompt (copy/paste into your model):");
        eprintln!("────────────────────────────────────────");
        eprintln!("{}", task);
        eprintln!("────────────────────────────────────────");
        if prompt_yes_no_default_yes(
            "Pause now to fix these findings, then let Flow rescan staged changes?",
        )? {
            prompt_press_enter(
                "Make the fixes, restage changes if needed, then press Enter to rescan staged changes.",
            )?;
            rescan_after_fix(&mut current_findings)?;
            if current_findings.is_empty() {
                if prompt_yes_no_default_yes(
                    "Secret scan is clean after manual fix. Continue with commit?",
                )? {
                    return Ok(());
                }
                bail!("Commit aborted after manual fix. Review changes and retry.");
            }
        }
    } else if !agent_enabled {
        eprintln!("ℹ️  manual fix-f-commit handoff disabled via FLOW_FIX_COMMIT_AGENT=off");
    }

    if interactive && !current_findings.is_empty() && ai_available {
        if prompt_yes_no_default_yes("Run auto-fix with ai?")? {
            let task = build_fix_f_commit_task(&current_findings);
            println!("Running auto-fix with ai...");
            if let Err(err) = run_fix_f_commit_ai(repo_root, &task) {
                eprintln!("⚠ Failed to run ai auto-fix: {err}");
            }
            rescan_after_fix(&mut current_findings)?;
            if current_findings.is_empty() {
                if prompt_yes_no_default_yes(
                    "Secret scan is clean after auto-fix. Continue with commit?",
                )? {

View on GitHub (pinned to a747e741ae)

Solutions

  1. Re-run the commit flow and answer 'yes' at the continuation prompt once the diff looks clean.
  2. Inspect the diff (`git diff --cached`) to confirm the secrets were properly removed, then retry.
  3. If findings are unexpectedly empty, run the secret scanner manually to double-check before forcing the commit.
Defensive patterns

Strategy: try-catch

Validate before calling

// re-run the scan yourself before entering the interactive flow
if scan_diff_for_secrets(repo_root).is_empty() {
    // safe to answer 'yes' at the continuation prompt
}

Try / catch

match run_sync() {
    Err(e) if e.to_string().contains("Commit aborted after manual fix") => {
        // user declined; review `git diff --cached` then re-run and confirm
        eprintln!("review staged changes and re-run the commit");
    }
    Err(e) => return Err(e),
    Ok(_) => {}
}

Prevention

When it happens

Trigger: During `run_sync`/`run_fast`/`run_with_check_sync`, secrets were found in the diff, the user chose manual fix, `run_fix_f_commit_ai`/manual path re-scanned, `current_findings.is_empty()` was true, and the user answered 'no' to the continuation prompt.

Common situations: User wants to double-check the redacted content before committing, accidentally answers no, or wants to amend/rebase the changes first before proceeding.

Related errors


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