Hmbown/CodeWhale · error · RuntimeError
Codewhale terminal receipt did not report completion
Error message
Codewhale terminal receipt did not report completion
What it means
The terminal receipt's status must be 'completed'. An exit code of 0 with any other status means the binary considers the run finished some other way (aborted, cancelled) while still exiting cleanly, so the harness refuses to score it.
Source
Thrown at integrations/verifiers-codewhale/codewhale_harness/harness.py:238
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,
)
is not None
)
def _bounded_terminal(meta: dict[str, Any]) -> dict[str, Any]:
terminal: dict[str, Any] = {}View on GitHub (pinned to 8880682c63)
Solutions
- Let rollouts finish naturally; avoid interrupting or wrapping exits
- Emit status='completed' from facade terminal metadata
- Inspect the raw stream-json stdout to see which status the binary actually reported
Example fix
# before (facade)
meta = {'status': 'ok'}
# after
meta = {'status': 'completed'} 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 report completion' in str(e):
inspect_raw_stdout_for('status') # see what the binary actually reported
raise Prevention
- Do not cancel or wrap rollout exits in orchestrators
- Keep the facade status vocabulary exactly 'completed'
- Preserve non-zero exits for abnormal endings so they fail earlier
When it happens
Trigger: Gracefully handled interrupts mapped to exit 0; facades emitting status='ok' or omitting the field; signals swallowed by wrapper scripts so the binary exits cleanly without completing.
Common situations: Orchestration layers cancelling rollouts on timeout; facades with status vocabularies copied from other tools; wrappers converting non-zero exits.
Related errors
- Codewhale terminal receipt did not use provider openai
- Codewhale terminal receipt model did not match rollout
- Codewhale terminal receipt did not confirm auto tools
- Codewhale terminal receipt sandbox did not match launch
- Codewhale successful run contained an error event
AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16).
Data as JSON: /api/errors/28c31549d8335aff.
Report an issue: GitHub.