abhigyanpatwari/GitNexus · error · SandboxError

proposer output destination already exists: {overlay_dir}

Error message

proposer output destination already exists: {overlay_dir}

What it means

Raised by `run_proposer` when the destination `overlay_dir` already exists before copying the proposer's overlay out of the worktree. `shutil.copytree` requires an absent target, and a pre-existing dir would silently merge stale files.

Source

Thrown at eval/workflow_bench/evolve.py:529

                    settings_json=sandbox.settings_json,
                    strict_mcp_config=True,
                    mcp_config_json='{"mcpServers":{}}',
                    allowed_tools=PROPOSER_ALLOWED_TOOLS,
                    disable_slash_commands=True,
                    transcript_projects=sandbox.transcript_projects,
                    transcript_cwd=Path("/workspace"),
                )
            if not record["ok"]:
                return record
            candidate_overlay_files(internal_overlay)
            if (
                not internal_proposal.is_file()
                or internal_proposal.is_symlink()
                or internal_proposal.stat().st_size > MAX_EVIDENCE_FILE_BYTES
            ):
                raise SandboxError("proposer did not produce one bounded regular proposal.md")
            if overlay_dir.exists():
                raise SandboxError(f"proposer output destination already exists: {overlay_dir}")
            shutil.copytree(internal_overlay, overlay_dir, copy_function=shutil.copyfile)
            proposal_path.parent.mkdir(parents=True, exist_ok=True)
            shutil.copyfile(internal_proposal, proposal_path)
            proposal_path.chmod(0o600)
            return record
        except BaseException as exc:
            primary = exc
            raise
        finally:
            try:
                runner.remove_clone(clone)
            except OSError as cleanup:
                if primary is None:
                    raise
                primary.add_note(f"proposer clone cleanup also failed: {type(cleanup).__name__}: {cleanup}")


# Promotion application lives in promotion_apply; the public helpers are

View on GitHub (pinned to d540b00184)

Solutions

  1. Point --out-root at a fresh directory, or delete the stale gen-<n>/overlay before retrying.
  2. Ensure each generation starts from a clean out-root (the harness creates gen dirs but does not wipe them).

Example fix

// before: results/wfevolve-.../gen-0/overlay already exists
rm -rf results/wfevolve-*/gen-0/overlay   # or use a new --out-root
// after: run_proposer copies into a fresh overlay_dir
Defensive patterns

Strategy: validation

Validate before calling

if overlay_dir.exists():
    raise FileExistsError(f'refuse to merge into existing overlay: {overlay_dir}')

Prevention

When it happens

Trigger: `run_proposer` is called with an `overlay_dir` (e.g. `gen-<n>/overlay`) that a prior, interrupted generation already created.

Common situations: Re-running evolve into the same out-root without cleaning it, or a previous generation crashed after creating the overlay dir but before completing.

Related errors


AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12). Data as JSON: /api/errors/7996d576fc6aa351. Report an issue: GitHub.