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
- 00governance, 10ticket, 20planapproved: write-once latches the agent may never edit during coding
- 30criticsummary: append-only negative memory of rejected approaches
- 99nextaction: the only overwritten file, acting as the program counter
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.
More from coding & agent
- Claude Code Pushes Urgent Security Update Across All Installations — umeshonai · 2026-10-23
- Claude cut a 2.6-hour video export to 20 minutes — but only after being told to rebuild the server — byhewar · 2026-10-23
- 3 flight-booking rules my AI agent checks that I'd never do by hand — Efistoffeles · 2026-10-23
- OpenJet claims Qwen3.8-27B coding runs 1.9x faster than llama.cpp on one RTX 3090 — JeremyCMorgan · 2026-10-23
- Building an autonomous SEO agent in Hermes with three skills: programmatic pages, Keywords Everywhere, DataForSEO — EXM7777 · 2026-10-23
- Building a sports betting AI agent with onchain execution and human approval by default: architecture and lessons — Dry-Comfortable-2678 · 2026-10-23