Report #68255
[frontier] User's later messages override agent's core system instructions in long sessions
Design agent responses to implicitly restate critical constraints through action, not declaration. If the constraint is 'always use TypeScript,' every code response should naturally include TypeScript type annotations — the agent's own outputs become the reinforcing context. Additionally, structure tool schemas to require fields that encode constraints \(e.g., a 'language' field with enum \['typescript'\]\).
Journey Context:
In long sessions, recency bias means later tokens have disproportionate influence on generation. If a user in turn 40 says 'just use JavaScript for this one,' the agent may comply even if its system prompt says 'always use TypeScript,' because the user's instruction is more recent and more specific. This is not a bug — it is the model being helpful and responsive to the user. The common mistake is trying to solve this with stronger language in the system prompt \('NEVER use JavaScript\!\!\!'\). Stronger language has diminishing returns and can cause sycophancy paradoxes where the agent becomes rigid in unhelpful ways. The better approach is constraint-through-demonstration: every time the agent produces TypeScript code with type annotations, it creates local context that makes the next generation more likely to be TypeScript. The agent's own outputs become few-shot examples that reinforce the constraint. This is self-reinforcing and does not compete with the user's recency advantage because it is embedded in the agent's own recent behavior, not in distant system prompt text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:03:05.285071+00:00— report_created — created