Hmbown/CodeWhale · error
workspace appears empty after File.list: {}
Error message
workspace appears empty after File.list: {} What it means
The eval harness walked the workspace root and collected zero files, yet a prior File.list tool call produced non-empty output (eval.rs:550). It treats that combination as inconsistent — files visible to the tool but none on disk under `root` — and fails with the File.list output embedded as evidence.
Source
Thrown at crates/tui/src/eval.rs:550
let walker = WalkBuilder::new(root)
.hidden(false)
.git_ignore(false)
.git_global(false)
.git_exclude(false)
.build();
for entry in walker {
let entry = entry.with_context(|| format!("failed to walk {}", root.display()))?;
if entry.file_type().is_some_and(|t| t.is_file()) {
files.push(entry.into_path());
}
}
if files.is_empty()
&& let Some(output) = list_output
&& !output.trim().is_empty()
{
return Err(anyhow!(
"workspace appears empty after File.list: {}",
output.trim()
));
}
files.sort();
Ok(WorkspaceSummary {
root: root.to_path_buf(),
file_count: files.len(),
files,
})
}
fn validate_outputs(
root: &Path,
shell_expect_token: &str,
search_output: Option<&str>,View on GitHub (pinned to 8880682c63)
Solutions
- Confirm real files exist under the eval root (`find <root> -type f`)
- Make the path passed to File.list identical to the eval workspace root
- Ensure setup steps actually write files before the summary check runs
Defensive patterns
Strategy: validation
Validate before calling
let count = walkdir::WalkDir::new(&root)
.into_iter()
.filter_map(Result::ok)
.filter(|e| e.file_type().is_file())
.count();
anyhow::ensure!(
count > 0,
"eval root {} has no files on disk",
root.display()
); Prevention
- Validate the workspace root right after setup, before the eval step runs
- Use one canonical absolute path for the root in every component
- Make setup steps fail loudly so missing files surface early
When it happens
Trigger: File.list enumerated a different directory than the eval `root` (absolute vs relative path mismatch); the listed entries were directories only; files exist in a sandboxed/virtual view but were never materialized on the real filesystem the walker sees.
Common situations: Eval workspace root misconfigured; the task's setup step failed silently and wrote nothing; container/host path mapping differs from the path the tool used.
Related errors
- patch context not found in {}: {}
- patch removal mismatch in {}: expected '{}'
- ${name} is unavailable in Workflow scripts: runs must be det
- new Date()/Date() is unavailable in Workflow scripts: runs m
- task(): expected an options object
AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16).
Data as JSON: /api/errors/c9aa9ca4f3b56edf.
Report an issue: GitHub.