Agent survives 62 compactions: a proxy lets it edit its own system prompt
cryowastakenbycryo · reddit · 2026-10-13
A developer shares a practical fix for long-horizon agents that go haywire after repeated context compactions: a small proxy lets the agent edit files that get appended to its system prompt, giving it a cache-stable source of truth it sees every turn.
- The agent doesn't touch the prompt directly; it swaps, adds, or edits files the proxy appends, keeping context stable across compactions.
- Result: hallucinations nearly stopped, and the agent maintains state indefinitely on the same project.
- One agent acting as its own working memory has compacted 62 times on a 128k budget (8M tokens seen), graduating from coder to project manager of other agents running production jobs.
- Memory isn't fully solved—agents still forget to take notes—but they stay sane.
The author's takeaway: the code is the asset you wanted; the agent is the asset you need to protect.
More from coding & agent
- Cursor now ships real Supabase backend changes via MCP, no SQL needed — XFreeze · 2026-10-14
- Developer: superhuman agents finished the last 20%, so vibe coding is dead — josh_bickett · 2026-10-14
- MIRA-AC trains research agents on proxy feedback, lifting symbolic regression from 50 to 63 solved — anirudhg9119 · 2026-10-14
- MIRA-AC behavior shift: hypothesis-distinguishing tests up 16.8% to 28%, stalled tweaks halved — anirudhg9119 · 2026-10-14
- MIRA-AC RL details: stitching decisions into one logical episode, updating only the meta-reasoner — anirudhg9119 · 2026-10-14
- MCP Event spec debuts: agents that listen to your system and act proactively — irvinebroque · 2026-10-14