Hmbown/CodeWhale · error · RuntimeError
Codewhale terminal receipt did not use provider openai
Error message
Codewhale terminal receipt did not use provider openai
What it means
After a successful launch (exit code 0), the harness parses the stream-json terminal receipt and verifies the provider field equals 'openai'. The rollout pins CODEWHALE_PROVIDER/--provider to openai (the Verifiers interception endpoint masquerades as OpenAI), so a different reported provider means the run did not go through the interception path.
Solutions
- Verify you are running the pinned Codewhale release (check terminal.binary_sha256 in the receipt)
- Ensure no environment variables override CODEWHALE_PROVIDER in config.resolved_env
- Confirm the harness argv still passes --provider openai and the binary accepts it
- Re-install the binary via setup() instead of a custom binary_path
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 use provider openai" in str(e):
# audit binary_sha256/config env for provider overrides before retrying
...
else:
raise Prevention
- Do not set CODEWHALE_PROVIDER or conflicting provider vars in resolved_env
- Always run the pinned release via managed setup
- Check receipt.provider in trace.info['codewhale'] when debugging
When it happens
Trigger: The Codewhale binary completed but its terminal receipt reports a provider other than 'openai' — e.g. the binary overrode the provider, ignored the --provider flag, or a mismatched binary/config routed elsewhere.
Common situations: Running a stale or modified binary that defaults to another provider; environment leakage (a real OPENAI/other provider key causing re-route); binary/config sha mismatch indicating a non-pinned build.
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
- Codewhale successful run contained an error event
- Codewhale terminal receipt did not confirm auto tools
- Codewhale terminal receipt model did not match rollout
- Codewhale terminal receipt sandbox did not match launch
- A provider and page loader are required.
AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15).
Data as JSON: /api/errors/a0f4eec5504024d4.
Report an issue: GitHub.
Appendix: source
Thrown at integrations/verifiers-codewhale/codewhale_harness/harness.py:228
"--sandbox",
sandbox,
"--output-format",
"stream-json",
]
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 (View on GitHub (pinned to 433685b202)