nikivdev/code · error
Sync auto-fix cleared raw conflicts for {} but validation an
Error message
Sync auto-fix cleared raw conflicts for {} but validation and merge finalization are still pending.
Run `:sync repair --packet {}` or validate and finish the merge manually. What it means
Thrown in src/sync.rs when the sync auto-fix agent cleared raw merge conflicts but returned SyncRepairRouteOutcome::ValidationPending — the conflict markers are gone, yet repo validation and merge finalization have not completed. The error points the user at the repair packet and `:sync repair --packet <path>` to finish the job.
Source
Thrown at src/sync.rs:4101
&format!(
"Flow sync auto-fix cleared the raw conflict markers for merge with {remote_ref}, but the repo is still mid-merge. Validate the merged result and only finish the merge commit once the highest-signal checks are clean.\n\nOriginal merge detail:\n{merge_detail}"
),
Some(&remote_ref),
None,
None,
)
.ok();
if let Some(packet_path) = repair_packet_path.as_ref() {
match try_route_sync_conflicts_to_sync_agent(repo_root, packet_path)? {
SyncRepairRouteOutcome::Completed => {
sync_progressln!("Sync agent validated and finalized the merge");
recorder.record(stage, "sync agent validated and finalized merge");
return Ok(());
}
SyncRepairRouteOutcome::ValidationPending => {
recorder
.record(stage, "merge validation pending after raw conflict repair");
bail!(
"Sync auto-fix cleared raw conflicts for {} but validation and merge finalization are still pending.\nRun `:sync repair --packet {}` or validate and finish the merge manually.",
remote_ref,
packet_path.display()
);
}
SyncRepairRouteOutcome::Unresolved => {}
}
}
recorder.record(stage, "raw conflicts auto-resolved but merge not finalized");
if let Some(packet_path) = repair_packet_path {
bail!(
"Sync auto-fix cleared raw conflicts for {} but the merge is still open.\nRun `:sync repair --packet {}` or validate and finish the merge manually.",
remote_ref,
packet_path.display()
);
}
bail!(
"Sync auto-fix cleared raw conflicts for {} but the merge is still open. Validate the repo and finish the merge manually.",View on GitHub (pinned to a747e741ae)
Solutions
- Run the suggested command: `:sync repair --packet <packet_path>` to resume and finalize the repair.
- Validate the repo manually and finish the merge: resolve any remaining state, `git add` resolved files, and `git commit` the merge.
- Inspect the packet file at the given path to see what the agent changed and what remains.
- Re-run sync after the merge is finalized.
Example fix
// before f sync // error: ...Run `:sync repair --packet /tmp/packet-123.json`... // after :sync repair --packet /tmp/packet-123.json git status && git commit # if finishing manually f sync
Defensive patterns
Strategy: try-catch
Validate before calling
import std::path::Path;
fn repair_packet_usable(path: &Path) -> bool {
path.exists() && std::fs::read_to_string(path).map(|s| !s.trim().is_empty()).unwrap_or(false)
} Try / catch
match sync::run(&repo_root, &cmd) {
Err(e) if e.to_string().contains("validation and merge finalization are still pending") => {
if let Some(packet) = extract_packet_path(&e.to_string()) {
eprintln!("Resuming repair: :sync repair --packet {}", packet);
}
}
other => other,
} Prevention
- Review the repair packet content after auto-fix runs; don't assume full completion.
- Run repo validation (tests/lint) right after any agent-assisted conflict repair.
- Avoid interrupting the repair agent mid-run (timeouts, Ctrl-C).
- Keep `:sync repair --packet <path>` in your notes — the error hands you the exact resume command.
When it happens
Trigger: During merge handling, the AI/agent repair route resolves raw conflicts but does not finish validation+finalization (returns ValidationPending instead of validated-and-finalized). Requires a repair packet path to exist, which is embedded in the message.
Common situations: Auto-fix agent timed out or hit a token/step limit mid-repair; validation step failed after conflict-marker removal; a partially successful repair run interrupted by network or API errors.
Related errors
- Sync auto-fix cleared raw conflicts for {} but the merge is
- Sync auto-fix cleared raw conflicts for {} but the merge is
- Unmerged files detected. Resolve them before syncing.
- Merge conflicts with {}. Run `:sync repair --packet {}` or r
- Commit aborted after auto-fix. Review changes and retry.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/1c12559e9e1363eb.
Report an issue: GitHub.