Codex CLI: Thread Forking into Sub-Agents
Codex CLI 0.107.0 introduces thread forking, allowing developers to branch any ongoing conversation into one or more sub-agents without leaving the current thread. This adds a new layer of flexibility to multi-agent workflows, enabling parallel task delegation while preserving the original thread's context. The release also improves reconnection reliability by restoring pending approvals and input requests when resuming a thread via thread/resume.
Sources & Mentions
4 external resources covering this update
Thread Forking for Sub-Agents
Codex CLI 0.107.0 ships one of the most-requested multi-agent workflow enhancements: the ability to fork an active thread directly into sub-agents. Until this release, spinning up a sub-agent required navigating away from the current context or manually managing thread transitions. Thread forking changes this by letting developers branch work from any point in a conversation, directing the forked thread to a sub-agent that picks up from the same history.
This capability extends the app server's thread/fork endpoint, which branches thread history into a new thread ID. The result is a non-destructive branch: the original thread continues uninterrupted while the new sub-agent thread takes on the delegated task independently. Teams running complex parallel workflows — such as code review alongside feature development, or multi-repository refactors split across agents — gain a cleaner, more predictable way to coordinate these workloads.
Improved Thread Reconnection
Alongside forking, 0.107.0 addresses a reliability gap in thread resumption. Previously, reconnecting via thread/resume could leave clients in a desynchronized state, dropping pending approval requests and input prompts. The release resolves this by restoring the full pending state on reconnect, so developers returning to a paused or interrupted thread find it exactly where they left it, with no approvals lost.
Startup Performance
A related fix prevents thread/start from blocking unrelated app-server requests during slow startup paths — including scenarios where MCP authentication checks introduced delays. This eliminates the stalls some users observed when launching Codex CLI in environments with authenticated MCP servers.
Bug Fixes
Several stability issues from prior releases are also resolved in 0.107.0:
- Interactive terminal sessions no longer print the final assistant response twice
- Large pasted-content placeholders now survive file completion correctly, fixing a regression introduced in 0.106.0
- ChatGPT accounts without plan information now initialize correctly instead of triggering repeated login prompts
- Diff rendering in the TUI better respects theme colors, including improved behavior in Windows Terminal and other low-color environments
- MCP OAuth flows now correctly forward the configured
oauth_resourceparameter