Hmbown/CodeWhale · error · RuntimeError

Codewhale terminal receipt did not confirm auto tools

Error message

Codewhale terminal receipt did not confirm auto tools

What it means

The harness launches Codewhale in full-auto tool mode ('exec --auto') and requires the receipt's approval_posture to be 'auto_tools'. Any other posture means tool approval prompts or a restricted mode was active, so the rollout did not exercise the intended auto-tools behavior and the trace is rejected.

Solutions

  1. Confirm the binary is the pinned release supporting 'exec --auto' (check binary_sha256)
  2. Ensure no CODEWHALE_HOME leftover config or project config forces approval prompts
  3. Re-run after removing binary_path so setup() installs the known-good release
Defensive patterns

Strategy: try-catch

Try / catch

try:
    result = await harness.launch(ctx, trace, runtime, endpoint, secret, mcp_urls)
except RuntimeError as e:
    if "did not confirm auto tools" in str(e):
        # check approval_posture in receipt; ensure pinned binary and clean CODEWHALE_HOME
        ...
    else:
        raise

Prevention

When it happens

Trigger: The binary reports an approval posture other than 'auto_tools' in its terminal metadata — e.g. it fell back to ask-per-tool mode, ignored --auto, or a project config re-enabled approval prompts despite --no-project-config.

Common situations: A stale/older binary that does not support --auto; leftover workspace or home config enabling approvals; the run ending before the agent entered auto mode.

Understand the failure class

Background: "invalid response format", "malformed payload", "missing data field": when an API returns 200 but the response shape is wrong — this error's family across 23 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15). Data as JSON: /api/errors/2289aab9b9350313. Report an issue: GitHub.

Appendix: source

Thrown at integrations/verifiers-codewhale/codewhale_harness/harness.py:232

        ]
        if self.config.max_turns is not None:
            argv.extend(["--max-turns", str(self.config.max_turns)])
        if self.config.disabled_tools:
            argv.extend(["--disallowed-tools", ",".join(self.config.disabled_tools)])
        if system:
            argv.extend(["--append-system-prompt", system])
        argv.extend(["--", str(prompt or "")])

        result = await runtime.run_program(argv, env)
        if result.exit_code == 0:
            receipt = _parse_stream_receipt(result.stdout)
            terminal = receipt["terminal"]
            if terminal.get("provider") != "openai":
                raise RuntimeError("Codewhale terminal receipt did not use provider openai")
            if terminal.get("model") != ctx.model:
                raise RuntimeError("Codewhale terminal receipt model did not match rollout")
            if terminal.get("approval_posture") != "auto_tools":
                raise RuntimeError("Codewhale terminal receipt did not confirm auto tools")
            if terminal.get("sandbox_posture") != sandbox:
                raise RuntimeError("Codewhale terminal receipt sandbox did not match launch")
            if receipt["events"].get("error", 0) != 0:
                raise RuntimeError("Codewhale successful run contained an error event")
            if terminal.get("status") != "completed":
                raise RuntimeError("Codewhale terminal receipt did not report completion")
            if terminal.get("termination_reason") != "resolved":
                raise RuntimeError("Codewhale terminal receipt was not resolved")
            trace.info["codewhale"] = receipt
        return result


def _has_version(output: str, version: str) -> bool:
    return (
        re.search(
            rf"(?<![0-9A-Za-z.+-]){re.escape(version)}(?![0-9A-Za-z.+-])",
            output,
        )

View on GitHub (pinned to 433685b202)