Let Codex call Codex recursively
What feature would you like to see?
I prompted Codex CLI to generate thoughtful AGENTS.md files in each subdirectory of a codebase, describing the code in that subdirectory and a summary of its own sub-subdirectories.
Currently Codex CLI says "I realize I can generate content as GPT, but I can't call myself directly in a script.".
See the screenshot below:
<img width="1854" height="1168" alt="Image" src="https://github.com/user-attachments/assets/9361be6d-c0a4-4b73-a816-05c724bfebcf" />
Could you please add a CLI flag like you already do for e.g. --search, but in this feature the flag would be e.g. --recursive that allows Codex to call itself for subtasks? This would let Codex run Codex in a Divide and Conquer or Dynamic Programming manner.
Additional information
Optionally, you can also add --recurse-parallel=N flag that would let Codex launch Codex subtasks in parallel up to N simultaneous Codex program instances. Use N=0 for as many Codex instances as there are logical CPU cores in the system.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗