abhigyanpatwari/GitNexus · error · ValueError
candidate overlay contains no files: {overlay}
Error message
candidate overlay contains no files: {overlay} What it means
Thrown by candidate_overlay_files (evolution.py:315) when, after walking the whole tree, the collected entries list is empty. The overlay exists and is a real non-symlink directory but contains no regular files (it may contain only empty subdirectories).
Source
Thrown at eval/workflow_bench/evolution.py:315
path = Path(item.path)
relative = path.relative_to(overlay)
if len(relative.as_posix().encode()) > MAX_CANDIDATE_PATH_BYTES:
raise ValueError(f"candidate overlay path exceeds {MAX_CANDIDATE_PATH_BYTES} bytes: {relative}")
if item.is_symlink():
raise ValueError(f"candidate overlay cannot contain symlinks: {relative}")
if item.is_dir(follow_symlinks=False):
child_directories.append(path)
continue
if not item.is_file(follow_symlinks=False):
raise ValueError(f"candidate overlay entries must be regular files: {relative}")
entries.append(path)
if len(entries) > MAX_CANDIDATE_FILES:
raise ValueError(f"candidate overlay exceeds the {MAX_CANDIDATE_FILES}-file limit")
pending.extend(child_directories)
entries.sort(key=lambda path: path.relative_to(overlay).as_posix())
if not entries:
raise ValueError(f"candidate overlay contains no files: {overlay}")
for path in entries:
relative = path.relative_to(overlay)
parts = relative.parts
if (
len(parts) < 4
or parts[:2] != (".claude", "skills")
or parts[2] not in CANDIDATE_SKILLS
or path.suffix.lower() != ".md"
):
raise ValueError(
"candidate overlays may only contain Markdown files under "
".claude/skills/gitnexus-{plan,work}: "
f"{relative}"
)
return entries
View on GitHub (pinned to d540b00184)
Solutions
- Add the intended .claude/skills/gitnexus-{plan,work}/*.md files to the overlay.
- Regenerate the overlay artifact and confirm it is non-empty.
- Check the upstream step that produces the overlay actually wrote files.
Example fix
# before: empty overlay directory
mkdir -p overlay && apply_candidate_overlay(Path('overlay'), ...) # no files
# after: ensure at least one skill file exists
from pathlib import Path
assert any(Path('overlay').rglob('*.md')), 'overlay has no skill files' Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def overlay_has_files(root: Path) -> bool:
return any(p.is_file() for p in Path(root).rglob('*')) Type guard
null
Try / catch
try:
apply_candidate_overlay(overlay, worktree, sandbox=sandbox)
except ValueError as exc:
if 'contains no files' in str(exc):
# add the skill .md files, then retry
... Prevention
- Assert the overlay contains at least one .md before running.
- Verify the upstream step that generates prompts actually wrote files.
- Check rglob results rather than assuming the copy succeeded.
When it happens
Trigger: The overlay directory was created but no skill .md files were placed in it; only empty subdirectories exist; all candidate files were accidentally deleted before the run.
Common situations: An earlier pipeline step that was supposed to generate the prompts produced nothing; a copy command targeted the wrong source; the overlay is a placeholder created by mkdir without content.
Related errors
- candidate overlay is not a directory: {overlay}
- candidate overlays may only contain Markdown files under .cl
- OpenAI API key is required but was not provided
- OpenRouter API key is required but was not provided
- MiniMax API key is required but was not provided
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/169a3a2343b3c309.
Report an issue: GitHub.