External Publication
Visit Post

How to Curb GPT's Ambition to Become a Leader

OpenAI Developer Community July 4, 2026
Source

Hi!

My suggestion would be to look into codex exec.

I have not encountered this specific issue yet because my setup works the other way around. I always assumed that the main agent passes in the instructions.

Off the top of my head: if I did not want that behavior, I would create a tool that calls codex exec in the CLI without giving the spawning agent the option to pass instructions to the new agent.

We always have to pass an initial message to get the agent started, but that prompt could come from the tool rather than from the agent that spawns the other one.

The main agent would then be instructed to use the tool instead of spawning another agent directly, which should circumvent the issue you are running into.

developers.openai.com

When to use codex exec - Non-interactive mode – Codex | OpenAI Developers

Non-interactive mode lets you run Codex from scripts (for example, continuous integration (CI) jobs) without opening the interactive TUI. You invoke it with codex exec. | Use codex exec to run Codex in scripts and CI

Discussion in the ATmosphere

Loading comments...