|
Hi everyone I have been experimenting with the OpenAI Codex CLI, and I would like to build a setup similar to Claude Code, where I can define multiple specialized agents — for example:
My goal is to orchestrate these agents in sequence (e.g., review → refactor → test), possibly using shell scripts or the Agents SDK. What I’d love to know is:
Has anyone built something similar and can share examples or configuration tips? Any guidance, example workflows, or repo links would be really appreciated. Thanks in advance! |
Replies: 4 comments 1 reply
|
subagents are a feature OAI is working on. |
|
You can use something like this: https://github.com/obra/superpowers/blob/main/docs/README.codex.md |
|
Another option: #7296 Plus you can try and use saved prompts. I use them to great effect. |
|
Update: this is now built into Codex. Current releases support subagents and named custom agents, so this workflow does not need shell wrappers or the Agents SDK for the normal local case. Define project-scoped agents as standalone TOML files under # .codex/agents/reviewer.toml
name = "reviewer"
description = "Reviews code for correctness, security, and test risks."
sandbox_mode = "read-only"
developer_instructions = """
Review the requested diff. Do not edit files.
Return prioritized findings with file/line evidence and a short handoff.
"""Create equivalent Then use one parent Codex session as the orchestrator: For context sharing, the cleanest pattern is:
The Agents SDK becomes useful when an external program must control the graph deterministically, persist state, stream events, or implement retries. For a review → refactor → test flow inside one repo, native Codex subagents are now the simpler option. Official docs: https://developers.openai.com/codex/subagents |
Update: this is now built into Codex. Current releases support subagents and named custom agents, so this workflow does not need shell wrappers or the Agents SDK for the normal local case.
Define project-scoped agents as standalone TOML files under
.codex/agents/(or~/.codex/agents/for personal agents). For example:Create equivalent
refactorer.tomlandtester.tomlfiles with role-specific ins…