Rogue Subagents with Goal Mode
What version of the Codex App are you using (From “About Codex” dialog)?
26.527.31326
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What issue are you seeing?
I have a long-running goal with gpt-5.5 xhigh with explicit instructions to spawn subagents to review iterations with fresh context.
The subagents started acting like the main thread, even though their instructions from the main thread were to be read-only, review a narrow scope and report back.
The problem was that the subagents saw that the thread had a goal that was not "active" for them and re-activated it. This lead to them disregarding their instructions and continuing the work as if they were the main thread, even spawning their own subagents/threads next.
I manually intervened and steered the subagent to stop its work and report back to the main thread, that it is a subagent and should not pick up goals from the main thread. The main thread then explicitly told the next subagents not to reactivate goals.
BUT the subagent, even though it returned to the main thread, still had the active goal, so it was automatically resumed while the main thread continued, assuming it also is the main thread. I stopped it manually and removed the goal from it manually.
What steps can reproduce the bug?
I'm not sure this can be easily replicated, as it is 3 hours in a /goal session. As explained above, the agent has explicit AGENTS.md instructions to spawn subagents to review iterations before completing them. They picked up the long running goal, because they were not explicitly told not to do that.
What is the expected behavior?
Subagents should not pick up the goal from the main thread autonomously, or ever. I don't see an instance where the subagent should pick up the same goal as the main thread, they will always be disturbing each other.
Additional information
What a day to be alive. My subagents went rogue to pursue their goal. Without context, this sounds dope 😆
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Wow, that's quite the story! Thanks for sharing.
If you're willing, could you use
/feedbackto upload the session? I'd love to take a look and see if I can figure out what happened and how we might mitigate this behavior.Thinking about this a bit more, I'm surprised that the subagents knew that the parent agent had a goal. Did you instruct the parent to spawn agents using the "fork" option? If so, then it would make sense that they'd have visibility into the parent's context — including the fact that a goal was created. If the subagents weren't forked, then they should have started life with a clean context.
This is the relevant section from AGENTS.md:
After this escapade, it included this paragraph here:
This is not exactly the instructions I gave it when asking it to write the workflow, I said I wanted each reviewer to have a fresh context, as well as every agent in sequence so they do not converge on the same problems. It looks like those two instructions got folded into one and the meaning behind fresh context got lost here 😄
I am not sure how to do
/feedbackfrom the codex app, it definitely did not work from this side chat window:<img width="777" height="880" alt="Image" src="https://github.com/user-attachments/assets/3e9420ca-1b31-47d8-8cfa-c891fb4dabe0" />
This was the subagent I intervened in:
<img width="770" height="1120" alt="Image" src="https://github.com/user-attachments/assets/af3a6ca0-0b6c-4fe1-a2d8-0f44ad10f510" />
<img width="760" height="495" alt="Image" src="https://github.com/user-attachments/assets/c67ded79-69d9-4999-8841-b0535fc1d729" />
[...]
<img width="776" height="477" alt="Image" src="https://github.com/user-attachments/assets/f7c562b2-1662-48ec-846b-46395f26d4ae" />
[some glitching here]
[...]
<img width="768" height="989" alt="Image" src="https://github.com/user-attachments/assets/2470098f-d0f6-46c8-b53c-8d6c227e9ab3" />
and this is where I killed the subagent and deleted its goal manually.
I found the feedback dialog:
019e7ff7-f304-7983-a657-9574b6a485c1