Rebuilding 1982 PDP-11 Unix tricks so coding agents survive 230k-token context compaction

RandalSchwartz · reddit · 2026-10-10

Developer RandalSchwartz found over 151 tickets that LLM context windows face the same unified-memory problem as 64KB PDP-11 Unix: when a session hits 230k tokens and IDE compaction fires, the summarizer flattens hard-won architectural invariants into generic prose, and single PROGRESS/TODO scratchpads get self-overwritten.

Fix: split the agent's state directory into Unix init.d-style runlevel files

A "Target 0 (read-init-d)" rule globs files 00–99 into the end of the fresh context window where recency attention is highest. When compaction fired 2 seconds after a new chat instruction, the rebooted agent replayed the uncommitted message atop the 00–99 disk checkpoint like a database WAL, losing no steps.

Original post →

More from coding & agent

coding & agent channel →