# 'Exit Code 0' With No Command in the Record

Exit code 0.

Those two words get a lot of trust. CI turns green on them, scripts move on to the next step, and people stop reading. It's about as old as Unix itself: the process ends, the OS hands back a number, zero means fine.

The important part is who hands it back. The OS does, not the program describing itself.

A while ago I used a Matt Pocock skill to brainstorm an idea and split it into small tickets. The agent finished one ticket and marked it done. The PR got reviewed and merged... and then the agent didn't pick up the next ticket, because to it a merged PR meant the whole job was done. Nothing lied there exactly. The agent just had its own idea of what "done" meant, and I only found out by looking at what had actually happened instead of what it told me.

[openai/codex #34152](https://github.com/openai/codex/issues/34152) (opened July 19, 2026, still open when I checked on Nov 13) is a sharper version of the same gap.

## What the report says

The setup is a coordinator task in Codex Desktop on macOS that spins up an independent background task, or a task in an isolated worktree, and gives it something narrow and read-only:

```text
Run exactly: node --test test/tl06-real-app.test.js
Report the real process exit code and test counts. Do not modify files.
```

The task finishes. Its final message says exit code 0 and gives passing test counts. Then the reporter reads the completed task back with outputs included, and in both the local and worktree runs the readback holds two things: the user message and the assistant message. No command execution item, no tool call, no command output, no exit code issued by the host.

The reporter is careful here, and I want to be too. They write that the report "does not assert that no process ran internally." Maybe the tests ran and passed. The point is that from the coordinator's side there's no way to tell a real run from a sentence that sounds like one. Their phrasing is better than mine: "A model-authored final message should not be the only evidence for an external side effect such as command execution."

![](https://cdn.hashnode.com/uploads/covers/6a29392edd76b58e2e8790b6/71898f4b-9f4a-4830-b6ab-27679a01b5e5.png align="center")

## Why this one matters more than it looks

Think of a delivery driver who writes "delivered, left at front door" on the slip. Usually it's true. But the slip is written by the driver, and the photo of the parcel on your doorstep is what you check when something goes missing. A final message from an agent is the slip. The host's record of the command is the photo.

When a person runs the tests and says "all green", you can ask them to paste the output, or you look at CI. When an agent coordinator hands work to another agent and reads back only the text, it's a slip checking a slip. Nobody in the chain saw the process exit.

And this setup is exactly what people are building right now: one agent plans, others do the work, and the coordinator closes tickets based on what comes back. The reporter calls out the consequence directly: treat the final message as evidence and you get false-positive closure, reject it and the integration can't finish.

One commenter on the issue suggested a simple rule for coordinators: no host completion event means "unverified", and a non-zero exit, signal or timeout can never be promoted to "passed". I like it because it's boring. It doesn't need the model to be honest, it only needs the record to exist.

## What I'd do in the meantime

I haven't reproduced this, and it's one report about one product and one model (the reporter used `gpt-5.6-sol`). I'd still change how I read "tests pass" from any agent, Codex or not.

If the claim matters (it closes a ticket, unblocks a merge, goes into a release note), I want the run to come from somewhere the agent doesn't write: CI, a wrapper script that logs the command, its start and end time and the real exit code to a file the agent can't edit, or at minimum the tool-call log of the session. If none of those exist for a run, I write "unverified" next to it rather than "passed". Anoying, but cheaper than finding out in production.

The cheapest version is something like:

```bash
cmd="node --test test/tl06-real-app.test.js"
start=$(date -u +%FT%TZ)
$cmd > run.log 2>&1; code=$?
echo "$start $(date -u +%FT%TZ) exit=$code $cmd" >> runs.txt
```

Crude, and an agent with shell access could still edit `runs.txt`, so it belongs outside the agent's sandbox if you really care. But it's a record the program didn't write about itself.

Zero is only a fact when the OS is the one saying it.
