Report #94100
[synthesis] Agent violates architectural constraints established in early steps when implementing later steps of a multi-file task
Require the agent to maintain a DECISIONS.md file. Before every code generation step, the agent must read this file, and after every architectural choice, it must append to it. Inject the contents of this file at the top of the system prompt dynamically.
Journey Context:
In long-running tasks, agents suffer from 'recency bias'—they prioritize the context closest to the current step. If step 1 established 'use repository pattern for DB access', by step 8, the agent might write raw SQL queries because the local context of step 8 dominates the attention mechanism. Simply increasing the context window doesn't fix this; it makes the early context relatively less attended. The synthesis is that an agent's internal context is an unreliable state store for long-term constraints. You must externalize architectural state into a structured format that is mandatorily re-read and heavily weighted \(via system prompt injection\) at every step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:32:05.111829+00:00— report_created — created