Fetching latest headlines…
Context Warp Drive: deterministic folding for long-running LLM agents
NORTH AMERICA
πŸ‡ΊπŸ‡Έ United Statesβ€’June 29, 2026

Context Warp Drive: deterministic folding for long-running LLM agents

0 views0 likes0 comments
Originally published byDev.to

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:

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.

Comments (0)

Sign in to join the discussion

Be the first to comment!