Skip to content

Improve goal continuation based on feedback#22045

Merged
etraut-openai merged 9 commits into
mainfrom
etraut/goal-continuation-prompt-user-message
May 11, 2026
Merged

Improve goal continuation based on feedback#22045
etraut-openai merged 9 commits into
mainfrom
etraut/goal-continuation-prompt-user-message

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented May 10, 2026

Summary

This PR updates the goal continuation prompt to address feedback from early adopters. There are two primary changes:

  1. Goal continuation and budget-limit steering prompts now use hidden user-context messages instead of hidden developer messages.
  2. The goal continuation prompt is refined to improve the model's ability to fully complete the active goal rather than stop at a smaller or merely passing subset.

The user-message transition is important for two reasons. First, it eliminates an issue where older steering messages could be responded to again after a new turn. Second, it works better with compaction because user messages are treated differently from developer messages during compaction.

The prompt refinements make persistence explicit, ground work in current evidence, encourage update_plan for multi-step progress visibility, and require stronger completion audits before calling update_goal. It also removes the elapsed-time reporting in the prompt; I saw evidence that this was causing the model to shortcut work as it became nervous about time.

These changes were tested with evals. Chriss4123 has also been running independent evals in #19910, and many of the improvements in this PR were suggested by him.

Verification

  • Tested with evals.
  • Added and updated focused codex-core coverage for hidden goal user context, continuation and budget-limit request shape, prompt rendering, and objective delimiter escaping.

@etraut-openai etraut-openai marked this pull request as ready for review May 10, 2026 17:40
@etraut-openai etraut-openai requested a review from a team as a code owner May 10, 2026 17:40
@etraut-openai etraut-openai changed the title Improve goal continuation steering Improve goal following May 10, 2026
@etraut-openai etraut-openai changed the title Improve goal following Improve goal continuation May 10, 2026
@etraut-openai etraut-openai changed the title Improve goal continuation Improve goal continuation based on feedback May 10, 2026
@Szpadel
Copy link
Copy Markdown

Szpadel commented May 11, 2026

The change to user message will also resolve: #21291

Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the direction better but the compaction thing must be solved
I approve to unlock

}

#[test]
fn goal_context_does_not_parse_as_visible_turn_item() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this proves the stale-steer claim. GoalContext is now hidden user context, but collect_user_messages() still drops it during compaction, so an older real steer can remain the last preserved user message after compaction

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't realize that compaction ignored hidden user context. Yeah, this will require more work. I'd prefer to do that as a follow-up PR. This PR doesn't solve the compaction problem but it doesn't make it any worse.

FragmentRegistrationProxy::new();
static SUBAGENT_NOTIFICATION_REGISTRATION: FragmentRegistrationProxy<SubagentNotification> =
FragmentRegistrationProxy::new();
static GOAL_CONTEXT_REGISTRATION: FragmentRegistrationProxy<GoalContext> =
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, this will still get discarded by compaction

@etraut-openai etraut-openai merged commit 96836e1 into main May 11, 2026
26 checks passed
@etraut-openai etraut-openai deleted the etraut/goal-continuation-prompt-user-message branch May 11, 2026 16:51
@github-actions github-actions Bot locked and limited conversation to collaborators May 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants