Skip to content

Move goal prompts to hidden user context#21792

Closed
etraut-openai wants to merge 1 commit into
mainfrom
etraut/goal-context-user-role
Closed

Move goal prompts to hidden user context#21792
etraut-openai wants to merge 1 commit into
mainfrom
etraut/goal-context-user-role

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

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

Why

Goal continuation and budget-limit steering were being injected as developer-role messages. That gives internal goal steering higher instruction priority than ordinary user context and can interfere with code that treats developer messages as durable instruction surface.

The goal prompt still is not user-authored transcript content. It should stay hidden from visible thread rendering, TurnItem::UserMessage parsing, and UserPromptSubmit hooks, while being presented to the model at user-message priority.

Related to #20792, but intentionally separate from that fix: hidden goal context should not become the first user-message preview for thread/list; goal-started thread discoverability should come from goal metadata instead.

What Changed

  • Added GoalContext, a contextual user fragment rendered as <goal_context>...</goal_context>.
  • Switched idle goal continuation and budget-limit steering to emit GoalContext user-role messages.
  • Preserved the existing goal prompt templates and <untrusted_objective> escaping.
  • Registered the new fragment with contextual-user detection so it remains hidden from visible transcript and hook paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant