Engineering Post: Slashing Context to 2KB Fixed Consistency by Removing Superseded State
__hymn · reddit · 2026-08-21
A Reddit user shared a 6-month engineering lesson: reducing context from 100KB to under 2KB actually improved model consistency.
The Problem:
In a long-running project without native memory, the author initially injected full session logs (append-only) for continuity. At 100KB, before hitting token limits, the model hit a "consistency wall": it quoted history accurately but behaved inconsistently across sessions, hedging, reopening closed decisions, or summarizing instead of working.
The Diagnosis:
The logs were full of abandoned approaches and reversed decisions—"superseded state"—carrying the same weight as current truths. The author concluded: It's not noise, it's contradiction. Giving the model a transcript of an argument without a winner destroys behavioral consistency.
The Fix:
Instead of compression (which averages contradictions), the author switched to injecting three artifacts under 2KB total:
- Identity: 4-6 sentences defining purpose, constraints, and behavior under uncertainty (no dates).
- Ledger: Dated entries, newest first, aggressively truncated. Entries must contain new facts not in the previous entry.
- State: A single document, overwritten (not appended), containing only current truth.
Takeaway:
For long-term systems, instruction beats evidence, and superseded evidence is worse than no evidence. Unhandled ambiguity caused more degradation than missing facts.
More from coding & agent
- DeepSeek Vision API details: up to 384 tokens per image at V4-Flash pricing — deepseek_ai · 2026-08-21
- Pre-commit Hook Guards AI Agents from Disabling Linting Rules — viglovikov · 2026-08-21
- Agent Training: Volume vs. Focusing on Weaknesses — trashnash007 · 2026-08-21
- Agent-Aware Architecture: Explicit Intent Layer for Token-Efficient Web Agents — sierracatalina · 2026-08-21
- NeoBrowser: an MCP server that drives your real logged-in Chrome — JeremyCMorgan · 2026-08-21
- Spent $40 in hours due to agents fact-checking each other endlessly. Cost control? — Thinking-master · 2026-08-21