What Changed — OpenAI Codex Catches Up
OpenAI Codex announced general availability of subagents on March 16, 2026, after a preview period. This feature allows Codex users to delegate tasks to specialized agents like "explorer" and "worker" directly in prompts. Codex also supports custom agents defined as TOML files in ~/.codex/agents/, which can be assigned specific models including the fast gpt-5.3-codex-spark.
The documentation example shows the syntax: Investigate why the settings modal fails to save. Have browser_debugger reproduce it, code_mapper trace the responsible code path, and ui_fixer implement the smallest fix once the failure mode is clear.
What It Means For Claude Code Users
Claude Code has had subagents longer, and the implementation is more mature. While Codex is playing catch-up, this announcement validates the subagent pattern as essential for modern coding workflows. The key difference: Claude Code's subagents are integrated into a more complete agentic ecosystem with MCP servers and better context management.
Simon Willison's analysis notes the implementations are "very similar," but Claude Code's documentation is more comprehensive. The Codex release includes three default subagents (explorer, worker, default), while Claude Code offers more nuanced control over agent behavior and context sharing.
How To Use Claude Code Subagents Today
Claude Code's subagent syntax is straightforward. In your CLAUDE.md or directly in prompts:
Refactor the authentication module. Have explorer analyze the current structure, worker implement the new JWT strategy, and reviewer check for security issues.
You can also define custom subagents in your configuration. Create a .claude-code/agents/ directory and add TOML files:
# ~/.claude-code/agents/security_audit.toml
name = "security_audit"
instructions = """
You are a security specialist. Focus on:
- Identifying authentication bypass risks
- Checking for injection vulnerabilities
- Verifying proper input validation
- Reviewing dependency security
"""
model = "claude-3-5-sonnet-20241022"
Then invoke it: Audit the payment processing code. Have security_audit run a comprehensive review.
Why Claude Code's Implementation Is Better
- MCP Integration: Claude Code subagents can leverage Model Context Protocol servers for specialized tasks (database queries, API calls, file operations)
- Context Management: Better control over what context each subagent receives, preventing token waste
- Workflow Integration: Seamless with existing
CLAUDE.mdpatterns and project-specific configurations - Parallel Processing: Worker subagents can handle batch operations efficiently
Try This Prompt Pattern Now
Combine subagents with the /compact flag for complex debugging:
claude code --compact "Debug the data export timeout. Have explorer profile performance bottlenecks, worker optimize the database queries, and validator ensure data integrity is maintained."
The /compact flag reduces token usage by ~40% while maintaining subagent coordination.
When To Use Which Subagent
- explorer: Research, analysis, understanding complex codebases
- worker: Implementation, refactoring, batch operations
- default: General coding tasks when specialization isn't needed
- Custom agents: Domain-specific expertise (security, testing, documentation)
The Bottom Line
While OpenAI Codex now has subagents, Claude Code's implementation is battle-tested and more integrated with the broader Claude ecosystem. The pattern is proven: breaking complex tasks into specialized subagents yields better results than monolithic prompts.
Start with simple subagent delegation in your next complex task, then build custom agents for your most frequent workflows.






