Codex's real config.toml (1.5 MB, ~11k project tables) had its table
names kept for the process's life once the start-up rename
(agent.RenameLegacy) listed them: 1.16 MB of packStrings in an exact
heap profile (memprofilerate=1) after 8 minutes idle in the real-account
sandbox, the largest holder left under cli.init. The whole parse was
already let go after a minute (tomlIdle); the names now go after
namesIdle (5 min) with no list, the other kept answers (GetTOMLTop,
GetTOMLTable, polled every 3s) stay, and a list a caller holds is not
touched.
Cost of a list after the let-go: BenchmarkTOMLTablesCold on that config,
9.0 ms and 21.5 MB of garbage per list (mote, M5 Pro).
Run: go test ./internal/edit (mote), TestTOMLNamesLetGoWhenIdle red with
the drop made a no-op by hand ("the names were kept past namesIdle"),
green with it.
Real-account sandbox (mote, real Codex config.toml), 8 minutes idle after
the page closed. Exact heap (memprofilerate=1): liveHeap 19.47 MB before
(v0.1.4082) -> 18.00 MB after, and RenameLegacy's held bytes 2.24 MB ->
0.86 MB, with no packStrings left. Without the profiler: liveHeap 19.57
-> 18.01 MB, heapInuse 33.1 -> 31.0 MB; footprint 71 vs 75 MB, within
one run's noise of each other. Also run on mica: gofmt, go vet for
darwin, windows and linux, go test -race ./internal/edit, and go test
./internal/agent ./internal/library ./internal/cli, all ok.