
Codex CLI 0.166.0: Standalone Exec Server and Resume Fixes
A deep dive into Codex CLI 0.166.0, focusing on the newly packaged standalone codex exec server binary and key packaging gotchas across npm and PyPI. We also cover crucial reliability fixes that preserve permissions, approvals, and reasoning token counts across thread resumes and forks.
Show Notes
- Releases · openai/codex - GitHub: https://github.com/openai/codex/releases
Chapter 1
The Executor Ships in the Box
Ethan Park
Morning. Quick thanks to Jellypod for helping make this daily show a reality. Last time we walked through the surface of Codex CLI 0.166.0: keyboard transcript selection, the resume flag on codex queue, and the network only flag on codex doctor. That was the preview. The stable release landed October 29 at 19:47 UTC, after alpha 2 through alpha 6, and the bigger story is underneath those features.
Maya
And it's easy to miss, because in the release notes it's one line under Chores. PR 57837: shipped the standalone executor in canonical CLI and app server release packages. The binary is called codex exec server. Before this, if you wanted that piece on its own, you had a harder time getting a signed, official copy. Now it's in the release archives.
Ethan Park
Here's what the packaging actually does, going by the details we have on that PR. The package metadata advertises the executor's path through an execServer field in the codex package JSON file. It's built and code signed in the release workflows, with empty entitlements on macOS. And the standalone shell installers, install.sh and install.ps1, verify and unpack the binary whenever that metadata says it's there.
Maya
So the practical command is the canonical installer. curl, dash f s S L, the chatgpt.com slash codex slash install.sh URL, piped to sh. That should leave the executor under your home directory, in dot codex, packages, standalone. After you update, go look for it. Don't assume.
Ethan Park
Why would you care? This part is our interpretation, not something the notes spell out. A dedicated executor binary suggests you can put just the execution side in a container, on a remote box, or in a headless worker, without carrying the whole interactive CLI there. If you've been building anything with paired devices or remote nodes, that's the direction this points.
Maya
Now the gotcha, and it will bite people. Because of npm registry package size constraints, the executor is deliberately left out of the @openai/codex npm package. So npm i, dash g, @openai/codex gets you 0.166.0, and npm did list it the same day, but it will not contain the standalone binary. The codex exec server subcommand and the runtime helpers are still there. The standalone file is not.
Ethan Park
And PyPI is a separate problem. GPTMap checked on October 30 and the openai codex package there was still at 0.163.0. That's three versions behind, and the reason isn't stated officially. So if a Python based pipeline provisions Codex, it won't pick up 0.166.0 at all. Use npm, or the curl installer, or a direct binary download.
Maya
One more, and this matters if you expose this thing. The exec server defaults to loopback, 127.0.0.1 with an ephemeral port, and no authentication. If you want a non loopback listener, you need to set the ws auth flag, with bearer tokens or capability tokens, and put TLS or an SSH tunnel in front. Please don't just bind it to every interface and hope.
Chapter 2
Resume and Fork Stop Forgetting
Ethan Park
The second half of this release is reliability, and it's concentrated on resume and fork. PR 57227 preserves acknowledged approval and permission settings when you resume or fork a thread. Before that, according to our brief, resuming an unloaded session or branching into a fork could reset approvals you'd already granted.
Maya
That's the kind of bug you only notice at the worst time. You come back to a long session, and suddenly it's asking permission again for things you'd settled hours ago. Or worse, you fork to try a risky approach and aren't sure what the fork inherited. Now the acknowledged settings carry over to both.
Ethan Park
The companion is PR 57839, and it's about reasoning tokens. Reasoning token accounting is now preserved across resume and fork, to avoid premature compaction. The way to read it: if the count of reasoning tokens goes missing on restore, the system thinks the context is fuller or emptier than it is, and compaction can fire early. Keeping the accounting means a restored thread behaves like the thread you left.
Maya
So here's a workflow check after you upgrade. Take a long thread, resume it, and see whether the approvals you granted still hold. Then fork it and watch whether compaction kicks in sooner than it used to. One caveat: the notes describe the fix, but they don't give numbers on how often this was happening, so treat your own session as the test.
Ethan Park
A few smaller things worth a mention. On NFS mounts, SQLite databases now initialize with DELETE journaling, PR 56552, and PR 57225 adds managed enforcement of that. If your home directory lives on shared network storage, that's aimed at lock trouble and migration failures.
Maya
Local image attachments now survive when you restore killed composer text, PR 57502. Unarchiving a parent thread restores the descendant threads it spawned, PR 57635, which matters if you use subagents. App server thread startup and shutdown races are fixed, and completed runtimes get released promptly, PRs 57787 and 57788. And TUI reconnection recovery is better, including offline /quit and /exit, PR 57820.
Ethan Park
So the checklist is short. Update with the curl installer if you want the executor binary. Confirm it's actually on disk. If you run anything over the network, check the auth flags. And resume one real session to see the approvals hold.