2026-10-16
The SDK’s types describe an older Codex than the one you’re running
Codex issue #53017: the TypeScript SDK has no declined command status, no in_progress patch status and no collab_tool_call item, though the Rust event stream emits all three.
The Codex TypeScript SDK describes the events from `codex exec` with hand-written types in `items.ts`, which say they are based on the Rust event definitions. Issue #53017 shows the two have drifted apart. On main, `CommandExecutionStatus` is `in_progress`, `completed` or `failed`, but the Rust side also emits `declined` when a command is refused. `PatchApplyStatus` is only `completed` or `failed`, while Rust emits `in_progress`. And `ThreadItem` has no `collab_tool_call` at all, though Rust emits one for subagent activity. A switch over those types type-checks cleanly and then meets values it was told could never arrive, so a declined command can fall through as if nothing happened.
The comparison against the Rust sources is the reporter’s own. They have a fix on a branch, but there is no fix PR yet — the repo limits PR creation to collaborators.
Treat SDK event types as a floor, not a contract. Give every switch over a status or item type a default branch that logs the unknown value instead of ignoring it.
Subscribe: /log/feed.xml