New to Claude Skills? Learn how to install them →

Codex CLI 0.148.0: Session Branching and Export

Codex CLI 0.148.0 added codex exec fork for headless session branching, /export to Markdown, session archiving, thread cost visibility, Bedrock as a provider and async hooks.

August 24, 2026
Get Claude Skills
10 min read

What 0.148.0 actually shipped

OpenAI released Codex CLI 0.148.0 on 18 August 2026, per the release notes on the openai/codex repository. It is a session-management release, and it is the one most likely to have slipped past you: 0.147.0 got attention for importing Cursor skills, 0.149.0 got attention for the interactive task dashboard, and 0.148.0 landed quietly in between with the features that make Codex scriptable.

The headline additions, in the release notes' own words:

  • "Export complete TUI conversations to Markdown with /export"
  • "Fork sessions with codex exec fork, and archive or restore sessions"
  • "Draft prompts while the TUI initializes, with resume and fork progress shown"
  • "View estimated thread credits or cost in /status, status lines, and terminal titles"
  • "Use Amazon Bedrock Runtime as a built-in provider with AWS profile, region support"
  • "Hooks can now run commands asynchronously and invoke MCP tools"

Taken together they point in one direction: Codex sessions become things you can branch, inspect, cost and automate, rather than a conversation that lives and dies in one terminal.

Session branching with codex exec fork

Forking a session was already possible interactively. The TUI has /fork, and there is a codex fork command. What 0.148.0 added is the headless equivalent, completing a pattern Codex already had elsewhere: codex exec is the non-interactive counterpart to the interactive CLI, and codex exec resume is the non-interactive counterpart to codex resume. codex exec fork fills the last gap.

The feature request that asked for it, now closed, is a clear statement of why it matters. The requester was building an automation harness that drives coding CLIs programmatically. codex exec --json handled queries, codex exec resume --json handled resumption, and forking had no programmatic path at all. Their workaround was spawning the interactive codex fork inside a pseudo-TTY and then polling the filesystem to find the result, which added roughly six seconds of overhead per fork.

The shape proposed in that issue is codex exec fork [OPTIONS] <SESSION_ID> [PROMPT], inheriting the usual exec options: --json, --sandbox, --model, -c, --ephemeral and --skip-git-repo-check. Worth being precise about the status of that: the release notes confirm the subcommand shipped, and the issue documents what was asked for. OpenAI's full flag reference lives on developers.openai.com/codex, which was not reachable from this environment when this piece was written, so check codex exec fork --help on your own install for the authoritative list rather than trusting a summary.

Why branching a session is useful

Forking is the session-level equivalent of git branch. You take a conversation that has already established context, the repository layout, the failing test, the constraint you spent ten minutes explaining, and split off a second line of work from that point without disturbing the original.

Two patterns make this concrete:

Trying several approaches from one setup. You have spent a while getting Codex to understand a migration. Rather than re-explaining it three times, fork three times from the same session and give each fork a different instruction. Compare the results, keep one.

Automating a fan-out. With a headless fork, a script can take one well-primed session and spawn a branch per file, per test, or per repository, all inheriting the same context. That is the case the original issue was written for, and the six seconds of pseudo-TTY overhead it removes is the difference between the pattern being practical and not.

Alongside forking, 0.148.0 added archive and restore for sessions from the TUI resume picker. That is bookkeeping rather than a capability, but if you accumulate sessions the way most people accumulate terminal tabs, having a way to get the picker back to a usable length matters.

Exporting a conversation with /export

/export

Per the release notes, this exports the complete TUI conversation to Markdown, "either to the clipboard or a new file."

Before this, getting a Codex transcript out meant selecting terminal text and hoping the wrapping survived. A structured Markdown export is a genuinely different thing: it is pasteable into a pull request description, an incident write-up, or a design document, and it is diffable.

There is a habit worth forming around it. If a Codex session produced a non-obvious decision, exporting the transcript and committing it next to the change is a cheap way to preserve the reasoning. Reviewers get the "why" without you writing it twice.

Cost visibility in /status

0.148.0 surfaced "estimated thread credits or cost in /status, status lines, and terminal titles" for eligible workspaces.

This is worth flagging because it lands in the same week Claude Code made a parallel change: its v2.1.239 changelog entry on 21 August 2026 notes that cost estimates in /cost, the status line and --max-budget-usd now include the 1.1 times US-only-inference premium for data-residency workspaces. Two competing CLIs pushing per-session cost into the always-visible chrome within days of each other is a reasonable signal about what teams have been asking for. We covered the Claude Code side of that pricing detail in Claude Code's data residency pricing premium.

Note the wording in both cases is estimated. These are running approximations for steering your own behaviour mid-session, not billing records.

Amazon Bedrock as a built-in provider

0.148.0 added "Amazon Bedrock Runtime as a built-in provider with AWS profile, region support."

For teams whose model access is mediated by Bedrock, this removes a layer. Previously that meant a custom provider configuration or a proxy in front of Codex; now it is a first-class option with the AWS profile and region handling you would expect.

The interesting bit is the convergence. Claude Code has supported Bedrock, Vertex and Foundry for a long time, and in the same week was closing a rendering gap for exactly those users (see Claude Code's fullscreen mode). Codex CLI adding Bedrock puts both major agentic CLIs inside the same enterprise procurement story.

Async hooks, and hooks that call MCP tools

The line reads: "Hooks can now run commands asynchronously and invoke MCP tools."

Two separate capabilities in one sentence, and both change what a hook can reasonably be.

Asynchronous execution means a hook no longer has to block the agent while it runs. A hook that ships telemetry, kicks off a slow lint, or notifies a chat channel can fire and let the session continue. The trade-off is the usual one for async work: you lose the guarantee that the hook finished before the next step, so a hook whose whole purpose is gating something must stay synchronous.

Invoking MCP tools from a hook is the more architecturally interesting half. It means a hook is no longer limited to shell commands; it can reach anything you have exposed through an MCP server. A post-edit hook could file a ticket, update a tracker, or query a knowledge base through the same MCP connection the agent itself uses, without you writing a bespoke CLI wrapper for each. Our roundup of MCP servers for developers covers what is available to point a hook at.

The one change that touches skills

Under documentation, the release notes record: "The bundled skill-creator guide is more focused, and validation now rejects TODO."

That is small, and it is the only Agent Skills related line in the release. Nothing about discovery, nothing about the skills directories, nothing about activation. Codex CLI reads skills from ~/.codex/skills/ globally and .codex/skills/ per project, and 0.148.0 leaves that untouched.

The validation change is still worth a moment, because it targets a real failure mode. A SKILL.md shipped with TODO left in it is not a hypothetical: it is what happens when someone scaffolds a skill, gets the structure right, and never finishes the body. The skill then installs cleanly, appears in the catalogue, and either misfires or does nothing useful. Rejecting TODO at validation time is a small guard against publishing a stub.

It is a good habit to copy regardless of which agent you use. Our guide on testing an agent skill before you ship it covers the wider checklist, and the same grep is trivial to run yourself:

grep -rnE 'TODO|TBD|FIXME|\[insert' .codex/skills/

The anatomy of a skill: SKILL.md with YAML frontmatter, plus optional scripts, references and assets folders

The fixes, and what they tell you

The fix list is short but each line points at something that was genuinely annoying:

FixWhat it means
"Model switches and settings updates no longer leave stale instructions behind"Changing model mid-session could leave the previous configuration's instructions in play
"Resumed sessions now restore their persisted working directory and approval policy"A resumed session could come back in the wrong directory or with the wrong approval settings
"Turns reconnect through temporary provider outages, and MCP servers recover"A brief upstream blip no longer kills the turn
"TUI startup no longer lets buffered terminal input activate prompts accidentally"Typing before Codex finished starting could trigger something you did not intend
"Composer and transcript rendering now handle CRLF pastes, wrapped whitespace"Pasting from Windows or a wrapped source rendered badly
"Sandbox restrictions now fail closed for denied or unreadable paths"The security-relevant one

That last row deserves the emphasis. Failing closed means an unreadable or denied path is now treated as denied rather than slipping through. A sandbox that fails open on an ambiguous path is not really a sandbox, so this is a correctness fix in the category where correctness matters most. If you are running Codex with sandboxing you were relying on, upgrading past 0.148.0 is not optional housekeeping.

The "draft prompts while the TUI initialises" addition belongs in the same spirit as the buffered-input fix: both address the awkward window between launching Codex and it being ready. Now you can start typing, and resume or fork progress is shown while you do.

Should you care if you are already past it?

If you are on 0.149.0 or the later 0.149.1, released 24 August 2026, you already have all of this. Nothing here needs a separate upgrade.

The reason to read it anyway is that release-note features are only useful if you know they exist. /export and codex exec fork are not things you discover by accident; they are things you go looking for once you know the tool has them. Sitting between two more heavily covered releases, 0.148.0 is exactly the version whose features get missed.

If you are still on 0.147.0 or earlier, the sandbox fail-closed fix alone is a reason to move.

How this compares to Claude Code

Worth being clear about what is and is not equivalent, since this site covers both:

CapabilityCodex CLIClaude Code
Headless session branchingcodex exec fork (0.148.0)Subagent forking, on by default in interactive sessions since v2.1.232
Transcript export/export to Markdown or clipboard (0.148.0)v in transcript mode opens the conversation in $EDITOR
Messaging a running sessioncodex queue (0.149.0)SendMessage and ListAgents
In-session cost display/status, status lines, terminal titles (0.148.0)/cost, status line, --max-budget-usd

These are adjacent rather than identical. Claude Code's subagent forking forks a conversation into a subagent within one session; codex exec fork branches a whole persisted session from outside it. Both are called forking and they solve different problems. Similarly, Claude Code's cross-session messaging and codex queue both deliver text into a running session, but they were designed for different entry points.

For the broader comparison of the two tools as skill hosts, see Claude Code vs Codex CLI for skills.

Where to go next

OpenAI's 0.148.0 release notes are the primary source for everything above and are short enough to read in full. For the surrounding releases already covered here, see Codex CLI's /import command and Cursor skills for 0.147.0 and the interactive task dashboard for 0.149.0. If you are setting Codex CLI up with skills for the first time, how to install skills in Codex CLI has the verified paths, and /platforms/codex-cli lists them alongside every other agent.

Verified 24 August 2026 directly against OpenAI's own release notes for rust-v0.148.0 and issue #11750 on github.com/openai/codex. developers.openai.com remained unreachable from this environment, so exact flag documentation for codex exec fork could not be confirmed against OpenAI's docs site.

Frequently asked questions