Gobstopper, a new context compaction proxy built in Rust, has launched to address the ballooning token costs associated with long-running coding sessions in Claude Code and Codex. The tool operates as an intermediary that summarizes older conversation turns while keeping the system prompt, initial task, and most recent exchanges intact. By sitting between the user and the model, it aims to reduce the volume of data sent to the LLM without permanently destroying the context history.

The Mechanism: Local Rules, No Extra Model Calls

Unlike other compaction methods that rely on additional LLM calls to generate summaries, Gobstopper uses local rules to determine what to keep and what to summarize. This approach eliminates the latency and cost of invoking a separate model for summarization. The proxy starts on a free local port and stops when the agent exits, with a default threshold set at 128,000 estimated tokens. It leaves the original session files unchanged, instead creating a separate compacted copy for the active session.

Benchmark Results: 29% Fewer Input Tokens

In a single-trial benchmark using Terminal-Bench 2.1, Gobstopper demonstrated a 29% reduction in input tokens sent compared to running Claude Code without the proxy. The test involved 89 tasks using GLM 5.3 Flash via Vercel AI Gateway. The proxy resolved 61 of 89 tasks, while the non-proxy baseline resolved 60, a difference the developers note is within single-trial noise. The primary savings came from reducing cache reads, where the context is resent on every step, dropping from 102.6M to 68.7M tokens.

Reversibility and Data Integrity

A critical feature of Gobstopper is its commitment to data integrity. The tool archives the original session bytes in a local vault, allowing users to search for missing details or run gobstopper undo to prepare a restored copy with a new session identity. This ensures that if the summarized context proves insufficient for a complex debugging task, the original data is not lost. The proxy supports Claude Code, Codex, opencode, Crush, Aider, and Goose, provided they allow a configurable provider address.

Key Takeaways

  • Gobstopper reduces input token usage by 29% in initial benchmarks by summarizing older context turns using local rules.
  • The tool preserves original session files in a local vault, enabling reversible compaction and data recovery.
  • It supports major coding agents like Claude Code and Codex, with live-checked routing for these platforms.
  • The proxy is built in Rust and available via a simple curl installer or cargo install from GitHub.

The Bottom Line

Gobstopper offers a pragmatic, low-latency solution for token bloat that avoids the cost and complexity of model-driven summarization. Its emphasis on reversibility and data integrity makes it a safer bet for developers who cannot afford to lose context, even if the current 29% savings are limited to specific cache-heavy workloads.