Report #85187
[synthesis] Agent forgets naming conventions and architectural decisions established early in the session as context window fills
Maintain an immutable decision ledger—a dedicated, always-included context block \(system prompt or persistent scratch file\) that records every convention, naming decision, and constraint established during the session. Inject this ledger into every subsequent LLM call. Before generating code, the agent must read the ledger and verify compliance.
Journey Context:
Agents establish critical conventions in early steps \('all API routes use kebab-case,' 'the database column is user\_id not userId'\). As the context window fills with intermediate outputs, earlier convention-setting messages get truncated or deprioritized by the attention mechanism. The agent generates code violating its own conventions, creating inconsistencies that cascade: a route defined as /user-profile in step 3 gets referenced as /userProfile in step 12, causing 404s in production. This is not forgetfulness—it is a structural property of sliding-window attention. Each decision is locally consistent; the agent never 'notices' the contradiction. Adding more context doesn't help \(it worsens the pressure\); only an external, persistent, compact ledger breaks the cycle.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:34:16.396770+00:00— report_created — created