{"record":{"id":"2289aab9b9350313","repo":"Hmbown/CodeWhale","slug":"codewhale-terminal-receipt-did-not-confirm-auto-to","errorCode":null,"errorMessage":"Codewhale terminal receipt did not confirm auto tools","messagePattern":"Codewhale terminal receipt did not confirm auto tools","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"integrations/verifiers-codewhale/codewhale_harness/harness.py","lineNumber":232,"sourceCode":"        ]\n        if self.config.max_turns is not None:\n            argv.extend([\"--max-turns\", str(self.config.max_turns)])\n        if self.config.disabled_tools:\n            argv.extend([\"--disallowed-tools\", \",\".join(self.config.disabled_tools)])\n        if system:\n            argv.extend([\"--append-system-prompt\", system])\n        argv.extend([\"--\", str(prompt or \"\")])\n\n        result = await runtime.run_program(argv, env)\n        if result.exit_code == 0:\n            receipt = _parse_stream_receipt(result.stdout)\n            terminal = receipt[\"terminal\"]\n            if terminal.get(\"provider\") != \"openai\":\n                raise RuntimeError(\"Codewhale terminal receipt did not use provider openai\")\n            if terminal.get(\"model\") != ctx.model:\n                raise RuntimeError(\"Codewhale terminal receipt model did not match rollout\")\n            if terminal.get(\"approval_posture\") != \"auto_tools\":\n                raise RuntimeError(\"Codewhale terminal receipt did not confirm auto tools\")\n            if terminal.get(\"sandbox_posture\") != sandbox:\n                raise RuntimeError(\"Codewhale terminal receipt sandbox did not match launch\")\n            if receipt[\"events\"].get(\"error\", 0) != 0:\n                raise RuntimeError(\"Codewhale successful run contained an error event\")\n            if terminal.get(\"status\") != \"completed\":\n                raise RuntimeError(\"Codewhale terminal receipt did not report completion\")\n            if terminal.get(\"termination_reason\") != \"resolved\":\n                raise RuntimeError(\"Codewhale terminal receipt was not resolved\")\n            trace.info[\"codewhale\"] = receipt\n        return result\n\n\ndef _has_version(output: str, version: str) -> bool:\n    return (\n        re.search(\n            rf\"(?<![0-9A-Za-z.+-]){re.escape(version)}(?![0-9A-Za-z.+-])\",\n            output,\n        )","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/integrations/verifiers-codewhale/codewhale_harness/harness.py#L214-L250","documentation":"exec is launched with --auto, letting tools run without per-call approval; the terminal receipt must confirm approval_posture='auto_tools'. The assertion guarantees the measured rollout was not silently downgraded to an approval-gated mode, which would stall headless runs and change tool behavior.","triggerScenarios":"A binary or home config forcing conservative approval despite --auto; facades omitting approval_posture; receipt vocabulary drift in binaries that do not match the pinned release.","commonSituations":"Default configs requiring confirmations; facades written against older receipt schemas; version skew between the binary and the 0.9.1 pin.","solutions":["Remove approval-forcing settings from the config inside the isolated home","Emit approval_posture='auto_tools' in facade terminal metadata","Run the release matching the pinned version so receipt field names match"],"exampleFix":"# before (facade)\nmeta = {'approval_posture': None}\n# after\nmeta = {'approval_posture': 'auto_tools'}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = await harness.launch(ctx, trace, runtime, endpoint, secret, mcp_urls)\nexcept RuntimeError as e:\n    if 'did not confirm auto tools' in str(e):\n        audit_facade_receipt('approval_posture')  # inspect raw stream-json stdout\n    raise","preventionTips":["Strip approval-forcing config from the isolated home","Pin the binary release that matches the receipt vocabulary","Treat receipt assertions as contracts in facade tests"],"tags":["receipt","integration","approvals","harness"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}