Your coding agent keeps stepping on the same rake: how to make lessons persist across sessions
madsthines · reddit · 2026-08-18
A developer asks how to stop coding agents from repeating the same mistakes: mid-task the agent works out a gotcha (tests need a local DB, the build wants a specific flag, use the shared client not a raw query), then the next session forgets everything — fresh context, same 20 minutes rediscovering it.
Tried and failed: piling rules into CLAUDE.md grows into a wall nobody reads; longer system prompts eat context; re-explaining each time isn't a strategy. None of it truly learns.
They ask the community: how do you maintain notes/rules without bloat? Is anyone doing something automatic — capturing the lesson when a command fails and feeding it back on the next run? Do you scope notes per repo/branch, and does any of it survive across machines or teams, or stay trapped on one laptop?
More from coding & agent
- Compound Engineering Update: New Skills and Windows Support — every · 2026-08-18
- Agent coding tips: run /simplify, then fresh-context review of the diff — lucasmeijer · 2026-08-18
- Developer claims Go is miles ahead for AI coding agents — dosco · 2026-08-18
- Claude Code CLI cuts p99 CPU usage by 50% via GC tweak — dsp_ · 2026-08-18
- Enterprise AI fails on messy data and context, not on the model — Rajxai · 2026-08-18
- DeepTeam: Open-Source Framework for Red Teaming LLMs and AI Agents — tom_doerr · 2026-08-18