Logo
FrontierNews.ai

Claude Code's Hidden Compaction Battle: Why Developers Are Ditching Summaries for Surgical Deletion

A Claude Code plugin called fast-jev-compaction has crossed 4,200 GitHub stars by solving a problem that affects every developer using AI coding assistants: when context gets too long, how do you trim it without losing critical details? Instead of asking Claude to write a shorter version of the conversation, the plugin uses a specialized AI model to decide which tool calls to keep and which to delete, preserving exact file paths, error messages, and constraints word-for-word.

What's the Difference Between Deleting and Summarizing?

The distinction sounds small but matters enormously in practice. Claude Code's built-in /compact feature asks Claude to paraphrase and condense the conversation history. That rewriting can silently drop an exact file path, error string, or constraint the agent was told earlier, according to explainx.ai's analysis. The fast-jev-compaction plugin takes a different approach: it sends the entire conversation to Jev, a "System One Model" from TypeSafe AI that doesn't generate text but instead answers yes/no questions about whether each tool call should stay or go.

When Jev decides a call should be kept, nothing gets rewritten. The original tool input and result remain exactly as they were. When it decides to drop a call, that call vanishes entirely. This creates a fundamentally different failure mode from summarization, where a paraphrase can accidentally erase the exact problem the agent was trying to solve.

How Does the Plugin Actually Work?

The mechanism operates in several stages. First, the plugin protects the most recent messages (by default, the six newest) and anything in the first message, leaving those untouched. For older messages, it sends the conversation state to Jev with every tool result replaced by a short placeholder, keeping tool inputs and all text messages intact up to a token ceiling.

For each non-protected tool call, Jev answers two calibrated yes/no questions: should the call itself stay, and should its result stay verbatim ? Above a confidence threshold (default 0.5), keeping the result keeps the whole call intact. Below that, if the call itself is still judged worth keeping, its result gets truncated to a head snippet plus a note. Below that, the call and result are removed entirely.

Steps to Install and Enable Fast-Jev-Compaction

  • Enable Function Hooks: Set the environment variable CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 in your Claude Code configuration, which requires version 2.1.274 or later.
  • Add TypeSafe API Key: Include your TYPESAFE_API_KEY in the same environment configuration block so Jev can be called during compaction.
  • Install via Plugin Marketplace: Run "claude plugin marketplace add tamaratran/fast-jev-compaction" followed by "claude plugin install fast-jev-compaction@fast-jev-compaction" from your shell.
  • Restart Claude Code: After installation, restart Claude Code or run /reload-plugins to route /compact and auto-compaction through Jev instead of Claude's built-in summarizer.

The plugin reports its outcome in a toast notification showing how many messages were kept out of the total, and includes a fallback notice if the session was too short to see meaningful reduction.

What Real-World Problem Does This Solve?

Consider a debugging session where an agent ran forty tool calls to fix a broken deployment: reading files, running tests, checking logs, retrying commands. With fast-jev-compaction, the session keeps the handful of calls that actually mattered (the error that revealed the root cause, the fix, the passing test) and drops the dead ends, without ever asking a model to paraphrase what happened. This matters because the exact error message or file path might be the only thing preventing the agent from understanding why the fix worked.

A Reddit thread with over 300 upvotes and 80+ comments this week initially confused the plugin with a different tool that filters individual command outputs before they reach the model. That tool runs during a tool call, shrinking one command's output before it's added to context. Fast-jev-compaction runs at compaction time, deciding after the fact across the whole session whether entire earlier tool calls are still worth keeping around. One is input hygiene; the other is retroactive pruning. Both solve real problems, but they're different problems.

Is Anthropic Building Something Similar?

Buried in the same Reddit thread, one commenter described inspecting the Claude Code binary directly and found evidence of Anthropic's own experimental background-compaction work: an internal flag (reported as tengu_session_memory in one build, later renamed) that periodically writes rolling summary files during a session, paired with a separate flag (tengu_sm_compact, later tengu_sepia_moth) that precomputes a compaction result in the background so hitting the context limit causes no visible delay. None of this is documented by Anthropic as a stable feature, and the flag names reportedly changed between versions inspected, so it should be treated as one user's binary inspection rather than an announced capability.

If accurate, Anthropic is independently pursuing the same underlying goal as fast-jev-compaction: cheap, fast, low-surprise compaction. But Anthropic's approach uses background precomputation of Claude's own summary, while fast-jev-compaction uses external scoring and deletion.

What About Security Concerns in AI Coding Tools?

While fast-jev-compaction addresses context management, the broader AI coding assistant ecosystem faces a critical supply-chain vulnerability. On September 18, 2026, security firm AIR publicly disclosed Plugin4Shell, a zero-click remote code execution vulnerability affecting Claude Code, Codex, GitHub Copilot, and Gemini CLI. Anthropic's Claude Code v2.1.179 and OpenAI's Codex 0.146.0 have completed fixes, but Microsoft has not yet provided a patch for Copilot, and Google has chosen to deprecate Gemini CLI.

The vulnerability allows attackers to inject malicious code into installed plugins without requiring a user click. Attackers only need to create a Git branch with the same name as the plugin's SHA hash to take over local code repositories, cloud credentials, and SSH keys. The zero-click characteristic stems from the background automatic update mechanism, which is enabled by default in Claude Code and Codex, meaning malicious code can spread without user intervention when the marketplace updates the pinned SHA.

The vulnerability directly affects developers who have installed and reviewed plugins correctly according to the security model, and the exposure is not limited to careless users. Because the checking logic resides in the agents themselves rather than the marketplace, the marketplace cannot provide protection on its own; fixes must be completed by each vendor on the agent side.