Codex Appears Set to Replace Context Compaction with Handoff-Style External Memory

量子位 · wechat · 2026-09-01

A developer digging through the Codex CLI repo found a new context tool and related work: instead of repeatedly compacting old context, Codex would switch to a fresh window when near the limit—leaving "work notes" as a handoff, with full history retained and searchable afterward. In effect, the agent gets an external memory: active workbench + handoff notes + searchable archive.

The motivation is that compaction is lossy: after several rounds of summarization, details like "why plan B was rejected" vanish, causing the agent to repeat mistakes hours later. context lets the model sense remaining capacity—like a fuel gauge—deciding whether to keep exploring or wrap up and write the handoff. Official docs still list compaction as the mechanism, so this looks like a work in progress. Amp Code tried similar ideas earlier, and the community has manual equivalents (plan.md, handoff prompts)—a signal for anyone building agents to rethink memory architecture.

Original post →

More from coding & agent

coding & agent channel →