Gobstopper compared with Claude Code /compact

Claude Code's /compact command and Gobstopper both make a long session's context smaller, and both are free. They differ in what happens to the history. /compact replaces the running session's messages with a summary the model writes at that moment. Gobstopper shows the cut first, writes a separate compacted copy, and keeps the exact source bytes in a local vault you can search later. For a session still running, gobstopper proxy keeps each request small enough that Claude Code's auto-compaction does not reach its trigger.

What /compact does

/compact is built into Claude Code. To produce the summary, Claude Code sends a separate request carrying the same system prompt, tools, and history as your conversation, plus a summarization instruction, then replaces the in-context message history with what the model writes. Passing instructions, such as /compact focus on the auth bug fix, steers what the summary keeps; there is no preview of what it will keep or drop. Claude Code also compacts automatically as the context approaches the model's limit, and /autocompact sets how full the window gets first. After a compaction, the startup content reloads: CLAUDE.md files, unscoped rules, and auto memory come back from disk, up to five of the files most recently modified are re-read, and invoked skill bodies are re-injected.

The original messages stay in the session transcript file, and /rewind can restore the conversation to an earlier checkpoint while that checkpoint's snapshots remain. What changes is the context every later request carries: whatever the summary left out is no longer in it. Anthropic's session-management guide calls the trade “lossy” and notes that the model is at its least intelligent point when it compacts, because context rot has already set in. If the dropped detail matters, recovering it means finding it in the transcript yourself and pasting it back.

What Gobstopper does

Gobstopper inspects saved Claude Code and Codex session files and prepares compacted copies. gobstopper plan shows what a strategy would cut at a threshold you choose, gobstopper eval compares strategies on the same frozen bytes, and gobstopper diff compares two archived snapshots. gobstopper apply writes the copy as a new fork under a fresh session ID; the source file is never changed. Before a copy publishes, a content-addressed local vault stores the exact source and candidate bytes, so gobstopper undo can restore a snapshot into a new fork, and search-snapshot and read-snapshot can return a record a strategy left out. The built-in strategies are local rules and make no model calls. Resuming a copy with a live provider requires separate compatibility testing.

For a running session, gobstopper proxy listens on 127.0.0.1 between the agent and its provider. Past the threshold (128,000 estimated tokens by default) it sends the head, one mechanical summary, and the newest turns verbatim, so the provider reports a smaller context and the client's own auto-compaction does not reach its trigger. The session files stay unchanged.

gobstopper detect                 # sessions, context sizes
gobstopper plan <session>         # preview the cut under each strategy
gobstopper apply <session>        # write the compacted copy as a new fork
gobstopper undo <session>         # restore a vaulted snapshot into a new fork

How they compare

Checked against Anthropic's Claude Code documentation and blog and Gobstopper's README and source on September 26, 2026
AspectClaude Code /compactGobstopper
What it changesThe running session's in-context history, replaced by a summary the model writesA separate copy of a saved Claude Code or Codex session file; the source is never changed. gobstopper proxy compacts each outgoing request and leaves session files alone
Who writes the summaryThe model, in a request carrying the same system prompt, tools, and history plus a summarization instruction; /compact focus text steers itNo model by default: built-in strategies drop or stub stale tool results by local rules, and structured and compacted add a metadata state card
Seeing the cut firstNo preview; the summary is written and applied in one step, and you read what it kept afterwardgobstopper plan, eval, and diff show each strategy's cut on the same frozen bytes before apply writes anything
When it runsOn demand, or automatically as the context nears the model's limit; /autocompact sets how full the window gets firstOn demand over saved sessions; gobstopper proxy compacts each request over a threshold you choose, so Claude Code's own auto-compaction does not reach its trigger
Undo/rewind returns the conversation to an earlier checkpoint; file snapshots cover the 100 most recent checkpoints and are swept about 30 days after the session last saved onegobstopper undo restores a vaulted snapshot into a new fork; the source file is never rewritten
What holds the originalsThe session's own transcript file; Claude Code documents that summarizing leaves the original messages in the transcriptA content-addressed local vault stores the exact source and candidate bytes before a copy publishes; search-snapshot and read-snapshot return archived records
Providers coveredClaude CodeClaude Code and Codex session files; the proxy covers any client that speaks Anthropic Messages, OpenAI Responses, or OpenAI Chat Completions with a custom provider address
PriceBuilt into Claude Code; the summarization request consumes usage like any other model callFree and open-source (MIT or Apache-2.0); the built-in strategies and the proxy make no model calls

Which one fits

Run /compact when a live session is bloated and a model-chosen summary is the right trade: it is already installed, it keeps working in place, and focus instructions steer it. Run gobstopper proxy to keep a running Claude Code or Codex session under a threshold so auto-compaction does not fire mid-task. Use Gobstopper's file commands when you want to see the cut before it happens, keep the exact source bytes, and be able to undo into a new fork. For the request-time proxy comparison with the CliffCompaction research proxy, see Gobstopper compared with CliffCompaction.

Questions

Does Gobstopper replace /compact?

They work at different layers. /compact shrinks the live session's context in place. Gobstopper's file commands prepare a separate compacted copy of a saved Claude Code or Codex session, and gobstopper proxy keeps each live request under a threshold you choose, so Claude Code's auto-compaction does not reach its trigger. /compact stays available either way.

Can I see what /compact will keep before it runs?

No. /compact generates the summary and applies it in one step; optional instructions such as /compact focus on the auth refactor steer what it keeps. gobstopper plan and gobstopper eval show the projected cut on the session's frozen bytes before any copy is written.

Does /compact delete the original conversation?

No. Claude Code's checkpointing documentation says summarizing leaves the original messages in the session transcript, and /rewind can restore the conversation to an earlier checkpoint while its snapshots remain. What changes is the context the next request carries: whatever the summary leaves out is no longer in it, and nothing lists what was dropped. Gobstopper's vault stores the exact source bytes of every copy, so search-snapshot can find a record a strategy left out.

What does each cost?

/compact is built into Claude Code and needs no install; the summarization request consumes usage like any other model call, cheapest while the prompt cache is warm. Gobstopper is free and open-source. Its built-in strategies and the proxy make no model calls, so the cut itself adds no tokens.

Can I run gobstopper proxy and still use /compact?

Yes. The proxy compacts each request over its threshold, so Claude Code's auto-compaction triggers later or not at all, and /compact remains a command you can run. Gobstopper's file commands work on saved session files, outside the running session.

Sources