On a real history (~15k Claude Code sessions), the idle heap after one
visit to the Sessions page still held two things:
- ccUUIDMemo's set of message uuids per file, as map[string]bool with
the strings gjson copied out: ~5.1 MB. It is now a uuidSet,
map[[16]byte]struct{}: an 8-4-4-4-12 uuid (any case) is parsed into
its 16 bytes, anything else is hashed with FNV-128a.
- ccListed, every Claude Code folder's last listing (path and key per
file): ~2 MB, kept for the life of the process. dropIdleCache now
clears it with the other memos it lets go; the next listing builds it
again from the folder.
Run on mote (go1.26.8):
- go test -count=1 ./internal/catalog ./internal/sessions
./internal/provider ./internal/agent ./internal/codexcat: ok
(before the ccListed line); ./internal/sessions again after: ok.
- gofmt -l, go vet and GOOS=windows go vet for internal/sessions: clean.
- Broken by hand: with ccListed.Clear() commented out,
TestIdleParsesLetGoAndComeBackFromDisk fails ("3 Claude Code
listings kept").
Not tried: the real-account idle measurement of this change alone; it
runs with the catalog change's measurement.