xai-org/grok-build · error
modified files scan thread panicked
Error message
modified files scan thread panicked
What it means
Error "modified files scan thread panicked" thrown in xai-org/grok-build.
Source
Thrown at crates/codegen/xai-fast-worktree/src/worktree/execute.rs:1308
// it on any finalize/checkout/commit failure.
let guard = PartialWorktreeGuard::new(&dest);
// Destructure before the finalize match consumes file_metadata.
let copy_stats = copy_result.stats;
let copied_paths = copy_result.copied_paths;
let file_metadata = copy_result.file_metadata;
// Phase 4: Finalize index.
// In standalone mode, the index is already at dest/.git/index (from the .git/ CoW).
// We just need to update stat cache entries so git status is fast.
let finalize_start = std::time::Instant::now();
match working_tree {
WorkingTreeMode::PreserveWorkingTree => {
// Join the modified-files scan (it ran in parallel with the copy).
let modified_files_in_source = if let Some(handle) = modified_scan_handle {
let result = handle
.join()
.map_err(|_| anyhow::anyhow!("modified files scan thread panicked"))?
.context("modified files scan failed")?;
dirty_files_report = Some(result.report);
Arc::new(result.paths)
} else {
Arc::new(dashmap::DashSet::new())
};
// Update index stat cache so `git status` is instant.
let clean = collect_clean_metadata(file_metadata, &modified_files_in_source);
git::update_index_stats(&dest, &clean)?;
}
WorkingTreeMode::CleanTracked => {
// `git reset --hard` rebuilds the index from HEAD with correct
// stat caches. No need to update stats first — reset overwrites
// the entire index unconditionally.
drop(file_metadata);
git::git_reset_hard_command(&dest, None)?;
}View on GitHub (pinned to bc7f02eddd)
When it happens
Trigger: Thrown at crates/codegen/xai-fast-worktree/src/worktree/execute.rs:1308 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31).
Data as JSON: /api/errors/b83d6d707f82b9d6.
Report an issue: GitHub.