On March 16, 2026, OpenAI officially released (GA) a new feature, "Subagents," in its coding agent "Codex."
It is currently available in the Codex app and Codex CLI, with support for various IDE extensions scheduled soon.
Why are subagents necessary? — the true nature of the context problem
AI models have a "context window," which is the upper limit of information they can reference at one time. When this is exhausted, two problems arise.
Context pollution
A state where useful information gets buried beneath noisy intermediate output. As search results and intermediate reasoning accumulate, the decision-making accuracy of the main agent declines.
Context rot
A state where low-priority detailed information clutters the context window and degrades processing performance. This becomes noticeable when routine chores such as "fetching file lists" or "summarizing large documents" pile up.
Subagents as a solution
The concept behind subagents is straightforward.
- Main agent: Focuses on understanding requirements, decision-making, and generating the final output
- Subagents: Handle routine chores (research, file analysis, auxiliary processing)
This allows multiple subagents to run in parallel while keeping the main context clean.

How subagents work
Default agents
Codex comes with three types of default subagents.
| Agent name | Primary role |
|---|---|
| explorer | Codebase exploration and analysis |
| worker | Parallel execution of large volumes of subtasks |
| default | General-purpose task processing |
Defining custom agents
By placing a TOML file under ~/.codex/agents/, you can define custom subagents. You can freely combine model specifications, custom instructions, and tool configurations.
# ~/.codex/agents/fast-reviewer.toml
name = "fast-reviewer"
model = "gpt-5.4-mini"
instructions = "コードの品質を確認し、問題点を簡潔にリストアップしてください。"
How orchestration works
Codex handles all coordination between agents.
- Spawns subagents
- Routes subsequent instructions
- Waits for results from all agents
- Returns a consolidated response
Important note: Subagents are spawned only when explicitly requested by the user. Because each subagent runs its own model and tool processing, it consumes more tokens than single-agent execution.
Cost optimization through combination with small models
The true value of subagents is realized by dividing roles between large and small models.
GPT-5.4(旗艦モデル)
└── タスク計画・調整・最終判断
GPT-5.4 mini(サブエージェント × 複数)
├── コードベースの検索
├── 大きなファイルのレビュー
└── 補足ドキュメントの処理
In Codex, using GPT-5.4 mini consumes only 30% of the GPT-5.4 quota. By delegating simple subtasks to mini or nano, you can boost productivity while drastically cutting overall costs.
For more details on the performance of GPT-5.4 mini and nano, please also refer to this article.
→ OpenAI releases its most powerful small models, "GPT-5.4 mini" and "GPT-5.4 nano"
Where to use them
| Platform | Status |
|---|---|
| Codex app | Available |
| Codex CLI | Available |
| IDE extensions | Coming soon |
You can check subagent execution status in the Codex app and CLI. IDE extensions are scheduled to support subagent visualization in the near future.
Sandboxing and security
Spawned subagents inherit the sandbox and network rules of their parent agent. Project profile layering, persistence of host authorizations, and symlinks for writable roots are also supported.
Practical use cases — which tasks are they best suited for?
Subagents are particularly effective for complex tasks that can be parallelized.
- Planning and executing large-scale codebase refactoring
- Investigating and applying specification changes across multiple files
- Simultaneously generating test code and modifying existing code
- Researching and summarizing across multiple documents
Conversely, for simple one-step tasks, single-agent execution consumes fewer tokens.
Architecture comparison with Claude Code
Interestingly, Codex's subagent implementation shares a very similar structure with Claude Code's multi-agent design. Even the agent names "explorer" and "worker" are virtually identical.
For guidance on choosing coding AI tools, this article is a helpful reference.
In addition, please refer to the following regarding the future of development stacks in the AI agent era.
→ Why you should avoid no-code/low-code in the AI agent era
What is the Codex App?
The Codex App is a desktop application for macOS released in February 2026. Designed to turn Codex—previously offered as a CLI or IDE extension—into an independent "command center," it features parallel execution of multiple tasks, a dashboard for monitoring task status at a glance, and customization via Skills. The subagents discussed in this article can be used in both this Codex App and the CLI.
Conclusion
| Key point | Details |
|---|---|
| Solves the context problem | Delegates routine chores to subagents, keeping the main context clean |
| Parallel execution | Accelerates processing by running multiple subagents simultaneously |
| Cost optimization | Reduces token consumption by selectively using mini and nano models for subagents |
| Custom configuration | Define custom agents via TOML files |
| Available | Available immediately in the Codex app and CLI (IDE extensions coming soon) |
Codex's subagent feature is a significant update that puts into practical use the new standard architecture for AI adoption: large models make decisions, and small models execute at scale.
Please feel free to contact GleamHub Inc. for consultations on selecting and utilizing coding AI tools.
Source: Subagents | OpenAI Developers / OpenAI officially introduces new "Subagents" feature to coding agent Codex | Mado no Mori








