Agent Memory Has a Sweet Spot: 10 Lines Optimal, Code Beats Rules for Tracking
rohanpaul_ai · x · 2026-10-05
Hands-on experiments on personal agent memory show that more notes stop helping past a point — extra memory lines make agents miss rules.
Key findings:
- Rules vs code: written rules work for style preferences (e.g., signing with a first name), but for anything the agent must count or track, a stated rule failed 44% of the time while code keeping the total failed 0%.
- Memory sweet spot: with Claude Haiku 4.5, violations dropped from 77% (no memory) to 20% at 10 lines, then rose back to 25% with longer memories.
- Self-rewriting memory stalls: agents rewriting their own memory from user complaints improved early but plateaued near 48% violations, versus 7.1% when every preference was simply stated upfront.
Takeaway: use code for anything the agent must count or track, and keep memory short.
More from coding & agent
- Same prompt showdown: Claude vs ChatGPT vs Figma Make — Tegadesigns · 2026-10-05
- Dev ports Muse voice assistant to a 15-year-old PSP using a coding agent — alexandr_wang · 2026-10-05
- Coding agents burn more tokens finding code than changing it — the interface is to blame — Wise_Reflection_8340 · 2026-10-05
- MicroFactory ships an AI robotic integrator that designs tooling and writes vision code — ihorbeaver · 2026-10-05
- Linear CEO shows AI agent triaging his bug and opening a fix PR autonomously — jeff_weinstein · 2026-10-05
- TunnelGPT connects a local project folder to ChatGPT over MCP — carlosrodera · 2026-10-05