Memory Fills Up
A hand-written AI agent run, line by line. The lesson: when memory fills up, summarize and keep going.
task
I saved 14 apartment listings. Which ones should I actually tour?
plan
Fourteen saved listings. Not hard, just long. Every detail I read has to fit in my memory — my context window.
- Open the saved list
- Review each one
- Shortlist the best
- Book the tours
lookyour saved list, all 14
scope the whole job before starting it
all 14 still available
Fourteen listings to read. Every detail stays in my memory, measured in tokens — chunks of words. Watch the gauge.
readlisting 1 — the place on Elm St
one place at a time, notes as I go
noted (1/14): bright, quiet, small kitchen
Every detail I read, I also have to remember.
readlisting 2 — the loft
noted (2/14): huge windows, loud street
readlisting 3 — the garden unit
noted (3/14): quiet, dark, cheap
Eleven listings to go. Same pattern every time — and my memory gauge keeps climbing.
readlistings 4–8 — the five walk-ups
five lookalikes, one pass — batching buys speed with memory
noted (8/14): all fine, none special
That was faster, but it cost a lot of memory.
your call
85% full. Your call: compress, or keep every detail?
Memory is at 85% with six listings left. What do I do?
“compress — trade detail for room” or “keep every detail”
The script writes both paths. Beats tagged with a pick happen only on that path.
if you picked “compress — trade detail for room”
Good — I fold the finished notes into a summary and free the room.
if you picked “keep every detail”
readlistings 9–10 — the two by the park
We keep everything. I push on, nearly full.
if you picked “keep every detail”
memory full — the notes cut off mid-listingToo full to finish the notes. When memory overflows I don't slow down — I lose work mid-thought.
if you picked “compress — trade detail for room”
What's finished can live as one line each. What's left is six addresses.
if you picked “keep every detail”
I hit the wall mid-review and the notes were lost. Compacting isn't optional — it's how I keep going.
compacted
This is called compacting. I rewrite my own memory: finished notes fold to a summary, and room comes back.
8/14 reviewed — full notes folded to one line each. Remaining: 6 listings on the north side
compacted
I lost work, and I have to compact anyway. The only choice was when to forget.
8/14 reviewed — full notes folded to one line each. Remaining: 6 listings on the north side
Working from my summary now — the fine details are gone. That's the trade.
readlistings 9–11
the summary holds everything I still need
noted (11/14): one strong contender
readlistings 12–14 — the last three
noted (14/14): two more contenders
All fourteen reviewed, on a fraction of the memory.
dorank the three contenders
the notes did the hard part already
shortlist: the loft, the garden unit, Elm St
askrequest tours for all three
Last step: lock in the tours.
3 tours booked for Saturday
Three tours booked — the shortlist did its job.
done
when memory fills up, summarize and keep going
- ·Memory is finite — every detail I read stays until I drop it.
- ·Folding finished notes to a line each bought room to finish.
- ·Keeping every detail hits the wall mid-notes and loses work.