remember in
Syntax
remember in "<file.md>"
What it does
Names a Markdown file the loop treats as its memory. On start it reads the file and feeds those lessons into the first plan; on stop it appends a dated entry recording how the run went. Across runs, the loop learns from its own history instead of starting cold each time.
A loop forgets everything between runs. reflect gives it memory within a run โ a failure feeds the next plan โ but that context evaporates when the run ends. remember in is the across-run counterpart: it persists the hard-won lessons (which fix worked, which dead end to avoid, which flaky test needs a retry) to a file that survives, so the next invocation begins where the last one left off. Reach for it on loops you run repeatedly โ a nightly audit, a recurring flaky-suite chase, a migration you resume over several sessions โ where the same mistakes would otherwise be rediscovered each time. Because the memory is plain Markdown, it is human-readable and human-editable: you can prune stale notes, correct a wrong lesson, or seed the file with guidance before the first run. It pairs well with an after N tries guard โ when a loop thrashes and stops, the memory file is exactly where the next run reads why, turning a dead end into a starting advantage instead of a repeated failure.
Example
loop "keep the flaky e2e suite green":
goal: the end-to-end suite passes three times in a row
remember in "loop.memory.md"
done when "pnpm test:e2e --repeat 3" passes
each cycle: plan, then act, then observe
when it fails: reflect, then plan againa loop that carries lessons between runs
Common mistakes
- Confusing it with
reflect.reflectis within-run memory (a failure feeds the next plan in the same run);remember inis across-run memory (lessons persist to a file between runs). You usually want both โ reflect to recover this run, remember to improve the next one. - Expecting memory on a one-shot loop. The value only compounds when the loop runs more than once. On a task you run a single time, the file is written but never read back โ skip it and save the noise.
- Letting the file rot. The memory is appended to on every stop, so it grows. A bloated file full of stale or contradictory notes can mislead the first plan. Prune it periodically โ it is plain Markdown you own.
- Wrong path or extension. Point at a real
.mdfile relative to the loop; a mistyped path means lessons silently never load and never save.