Report #2896
[agent\_craft] Recency bias makes the agent over-weight the last user message and ignore earlier project rules
Normalize turn weight by re-surfacing authoritative project rules and the current task framing after every user message, and keep a 'contract' slot that is always inserted near the end of the context.
Journey Context:
Transformers have recency bias: the last few tokens get disproportionate attention. In agent sessions, this means a user's casual new request can override documented project rules, coding style, or safety constraints. The fix is not to make the system prompt longer \(that exacerbates middle loss\) but to keep a compact, high-priority contract slot that is re-inserted after each turn. This slot contains only rules that are active for the current task. It should be updated when the task changes. Wrong turn: repeating the entire system prompt every turn, which wastes tokens and trains the model to ignore it. The contract slot should be curated and task-specific.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T14:34:04.227732+00:00— report_created — created