Goal mode replays the last manual steer on later continuation turns
What version of the IDE extension are you using?
26.5602.40724
What subscription do you have?
Pro 5x
Which IDE are you using?
VS Code
What platform is your computer?
Linux 6.18.33.1-microsoft-standard-WSL2 x86_64 x86_64
What issue are you seeing?
During an active /goal, if I manually steer the agent once, that steer can be handled correctly in the current active turn but then become salient again on later goal continuation turns.
The user-visible behavior is that Codex treats the last manual steer entered during the goal as if it were fresh work again, instead of treating it as already consumed by the active turn. This seems especially likely around compaction / resume boundaries, where the preserved history can make the old steer look like the latest real user request.
I originally framed this as hidden goal continuation context being persisted and replayed. After looking through #21291, #19910, #22045, and #22174, I think the broader issue is that manual steer input during an active goal lacks explicit consumed / turn-scoped lifecycle semantics, while goal continuation context also needs clear transient / reattachment semantics.
What steps can reproduce the bug?
- Start an active
/goal. - While the goal is running, manually steer the active turn with a short instruction.
- Let Codex handle that steer.
- Allow the goal to continue across later turns and/or compaction.
- Observe that the same manual steer can become salient again and be treated as fresh work.
A related core-level repro is to simulate resumed / compacted history containing a normal user steer plus goal continuation context. If fresh goal context is dropped or not reattached correctly, the older real user steer can remain the last preserved user message and regain salience as if it were the current request.
What is the expected behavior?
Manual steer input entered during an active goal should be visible to the model for the active turn, but once handled, it should not keep dominating later goal continuation turns as the latest real user request.
Goal continuation context should be regenerated or reattached from the persisted ThreadGoal at goal continuation / compaction boundaries. Hidden runtime context should not become stale durable replay history, but the active goal should still remain available to the model when continuation resumes.
Additional information
This seems closely related to #21291 and #19910, especially the #21291 failure mode where the last manual steer entered during an active goal becomes salient again after compaction and is treated as fresh work.
My reading is that #22045 improved one part of this by moving goal continuation / budget-limit steering from hidden developer context to hidden user context. However, the review discussion for that PR noted that hidden GoalContext could still be dropped by collect_user_messages() during compaction, leaving an older ordinary user steer as the last preserved user message. The follow-up discussion also acknowledged that compaction would need additional work.
That follow-up appears to have been #22174, which explicitly targeted the #21291 failure mode by preserving goal context during compaction, but it was closed as an unmerged draft. As a result, although #21291 and #19910 are now closed, this behavior appears not to be fully addressed: around goal continuation / compaction boundaries, the model can fall back to an older ordinary user message or manual steer and treat it as fresh work.
This suggests two complementary areas to check:
- Goal continuation context should be generated fresh from the persisted
ThreadGoalat goal continuation / compaction boundaries, rather than relying on stale hidden context persisted in replay history.
- Manual steer input entered during an active goal should have an explicit consumed / turn-scoped lifecycle, so once it has been handled in the active turn, it does not continue to dominate later goal continuation turns as the latest real user request.
These directions seem compatible with the issue described here: consumed manual steers should not dominate later goal turns, while hidden goal runtime context should have a clear transient / reattachment lifecycle instead of being relied on as stale durable replay history.
I locally explored a small patch direction that cleans up stale hidden goal internal context from replay history. I think that direction is compatible with the desired architecture, but it is not sufficient by itself: the user-visible stale-steer behavior also needs explicit consumed / turn-scoped semantics for manual steer input.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗