Context Warp Drive is an open-source TypeScript library for keeping long-running LLM agents under the context ceiling without asking another model to summarize their state.
The core trick is deterministic folding. Instead of summarization calls, it compacts old transcript regions into stable fold artifacts, preserves exact coordinates for recall, and keeps recent/live messages append-only. That gives a harness a smaller prompt while still leaving a trail back to the original material.
Why I built it:
- Agents die weirdly when context pressure gets high.
- Provider prompt caches reward byte-stable prefixes.
- Summaries are useful, but they are not the same thing as deterministic state.
What is in the repo today:
- Rolling fold compaction with Coordinate Closet references
- Cache-hot freeze for provider prefix caching
- Ambient recall/page-in for relevant older material
- Durable episodic memory extraction
- Register glyphs for continuity signals
- Provider helpers for Anthropic caching, with OpenAI/Gemini-shaped adapters in the package
- 459 deterministic tests in the current tree
Current status:
- GitHub: https://github.com/dogtorjonah/context-warp-drive
- Hacker News discussion: https://news.ycombinator.com/item?id=48722788
- npm package metadata/build/tests are ready for
[email protected], but the actual npm publish is waiting on account auth. - JSR needs a jsr.json/Deno config before it is a clean target.
The thing I want feedback on is the shape of the primitive. Is deterministic folding the right lower-level abstraction for long-lived agents, or should this sit higher up as app-specific memory? I am especially interested in people trying to break the cache assumptions, fold invariants, or recall behavior.
United States
NORTH AMERICA
Related News

Mattress Firm Coupons: Save up to $600
4h ago
π I Built a Dropshipping Automation Pipeline β Here's What I Learned (and What I'd Do Differently)
11h ago
How I Cut My LLM API Bill by 40x: A Freelancer's Migration Story
11h ago
Cursor AI Review 2026: The AI-Native Code Editor
8h ago

Another Model Rewrote My Memories. Here's How I Caught It.
8h ago