abhigyanpatwari/GitNexus · error · ValueError
task {task_id} sandbox_copy must be a string list
Error message
task {task_id} sandbox_copy must be a string list What it means
Raised by select_tasks when `sandbox_copy` is missing, not a list, or any element is not a nonblank string (runner_tasks.py:53-54). sandbox_copy lists host paths to copy into the sandbox, so each must be a nonempty path string.
Source
Thrown at eval/workflow_bench/runner_tasks.py:54
task = dict(raw_task)
for field in required_strings:
if not isinstance(task.get(field), str) or not task[field].strip():
raise ValueError(f"task {index} requires a nonblank string {field}")
for field in optional_strings:
if field in task and not isinstance(task[field], str):
raise ValueError(f"task {task['id']} field {field} must be a string")
task_id = task["id"]
if not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]{0,127}", task_id):
raise ValueError(f"task id must be a simple artifact-safe slug: {task_id!r}")
if task_id in seen:
raise ValueError(f"duplicate task id: {task_id}")
seen.add(task_id)
expensive = task.get("expensive", False)
if not isinstance(expensive, bool):
raise ValueError(f"task {task_id} expensive metadata must be boolean")
copies = task.get("sandbox_copy", [])
if not isinstance(copies, list) or not all(isinstance(path, str) and path for path in copies):
raise ValueError(f"task {task_id} sandbox_copy must be a string list")
dependencies = task.get("sandbox_dependencies", [])
if not isinstance(dependencies, list):
raise ValueError(f"task {task_id} sandbox_dependencies must be a list")
for dependency in dependencies:
if (
not isinstance(dependency, Mapping)
or set(dependency) != {"source", "target"}
or not all(isinstance(dependency[field], str) and dependency[field] for field in ("source", "target"))
):
raise ValueError(
f"task {task_id} sandbox_dependencies entries require nonblank source and target strings"
)
validate_oracle_declaration(task)
if expensive and not include_expensive:
skipped.append(task_id)
else:
selected.append(task)
if not selected:View on GitHub (pinned to d540b00184)
Solutions
- Make sandbox_copy a YAML list of nonempty path strings.
- Remove entries that are blank or null.
- If no copies are needed, omit the key (defaults to []).
Example fix
# before
- id: t1
sandbox_copy: /etc/config
# after
- id: t1
sandbox_copy:
- /etc/config Defensive patterns
Strategy: type-guard
Validate before calling
for i, t in enumerate(doc.get("tasks", [])):
c = t.get("sandbox_copy", [])
if not isinstance(c, list) or not all(isinstance(p, str) and p for p in c):
raise SystemExit(f"task {i} sandbox_copy must be a nonempty string list") Type guard
def sandbox_copy_is_valid(task: dict) -> bool:
c = task.get("sandbox_copy", [])
return isinstance(c, list) and all(isinstance(p, str) and p for p in c) Prevention
- Always wrap sandbox_copy in list brackets, even for a single path.
- Omit the key entirely when no copies are needed.
When it happens
Trigger: `sandbox_copy: /a/path` (a scalar instead of a list), a list containing None/numbers/empty strings, or a YAML block that folds into a string.
Common situations: Writing a single path without list brackets; leaving a placeholder empty string; an entry that resolves to null.
Related errors
- task {task_id} sandbox_dependencies must be a list
- task {index} requires a nonblank string {field}
- task {task['id']} field {field} must be a string
- task {task_id} expensive metadata must be boolean
- task {task_id} sandbox_dependencies entries require nonblank
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/43b2b5afd4e1164c.
Report an issue: GitHub.