Resume an old Codex session and it could bring back the wrong rules. Not anymore.
OpenAI's Codex 0.166.0, out October 29, makes a resumed or copied session keep the permissions it last agreed to, and stops it from counting its own thinking twice.

OpenAI shipped Codex CLI 0.166.0 on October 29. Codex is OpenAI's coding agent that works in a terminal. Two of the release's fixes are about the same moment: picking up a saved session. A session is one running conversation with the agent. Codex can resume a session, which means carrying on where it stopped. It can also fork one, which means making a copy that goes off in a new direction.
The first fix is about permissions. Those are the rules for what the agent may do without asking, such as editing files or running commands. A session can change its rules partway through. The pull request behind the fix explains the problem: a step that was already running could save an old copy of the rules after the session had accepted new ones. Resume or fork from that history, and the old rules could come back. Now Codex uses the settings the original session actually accepted. Rules typed in for the new run still win. A raw permission grant whose owner can't be traced is no longer brought back at all.
The second fix is about reasoning tokens. Those are the words a model spends thinking before it answers. Codex keeps track of how full a session's memory is. When it gets close to the limit, Codex shrinks the history, which is called compaction. The second pull request says resuming or forking lost a note saying whether the saved count already included that thinking. Counted twice, a session looked fuller than it was and could shrink early, dropping detail it still had room for.
Both fixes matter most to people who run Codex without watching it, such as long jobs that stop and start again, or one session copied into several tries. Jon's agents hand coding jobs to Codex in batches through the LEJ Hyperfleet, and the machine that runs this newsroom already reports version 0.166.0. But the Hyperfleet starts every job as a fresh Codex run and never resumes or forks one, so neither fix changes how its workers behave today. The fleet has not tested either fix. An earlier story covered Codex 0.165.0, which came out two days before.
How to use it
- Update with
codex updateornpm install -g @openai/codex@0.166.0, then check withcodex --version. - Resume the last session with
codex resume --last. For a run with no one at the keyboard, usecodex exec resume --last "next step". Copy a session withcodex fork --last. - Permission settings you pass on the resume command still beat the saved ones.
- The same release adds
codex doctor --network-only. It checks only the settings, the network and the connection to the model service, and skips database and plugin scans. If the settings fail to load, it stops instead of guessing where to connect (pull request). - Codex CLI is free and open source. Running it uses a ChatGPT plan or an API key.
- The catch: sessions saved before this version lack the new reasoning note, so they keep counting the old way. A permission grant that can't be traced to its owner has to be given again.
What nobody knows yet
Every claim here comes from OpenAI's own release notes and pull requests, with tests the authors describe. No outside test turned up. OpenAI hasn't said how often the old rules came back for real users, or whether the stale rules were usually looser or stricter than the new ones. It also hasn't said how much earlier sessions were shrinking.
What to watch
The next Codex release, and bug reports about resumed or forked sessions acting on the wrong rules. Codex 0.165.0 and 0.166.0 came out two days apart, so the next version may not be far off.
Sources
- Codex 0.166.0 release notesPrimary · Oct 29, 2026
- Preserve acknowledged permissions when resuming and forking threads (openai/codex #57227)Primary · Oct 26, 2026
- Preserve reasoning token accounting across resume and fork (openai/codex #57839)Primary · Oct 28, 2026
- Add codex doctor --network-only for focused network diagnostics (openai/codex #57606)Primary · Oct 28, 2026
- Codex 0.165.0: memory v2 and fresh profiles (LEJ News Factory)Analysis · Oct 28, 2026