In Claude Code, Cursor, and Gemini, developers don't run out of tokens from typing—they burn their budgets from O(N²) session history re-feeding, zombie terminal logs, and unvetted repository ingestion. Take control with deterministic session surgery and real-time telemetry.
Nobody runs out of tokens typing a 20-word prompt. The cost explodes from the hidden transcript graveyard.
Every turn in Claude Code, Cursor, or Gemini re-submits the entire conversation transcript from turn 1. A 25-turn debugging session re-sends the same past stack traces and file dumps 25 times over, burning $0.20–$0.50 on every single prompt.
A 4,000-token failed build output from 15 turns ago that was fixed an hour ago is still sitting frozen in your active transcript. You pay for that dead error message on every subsequent keystroke.
Developers ask an agent to "audit the codebase" without realizing that auto-generated schemas, massive lockfiles, or fixture mocks just dumped 150,000 tokens into the prompt, triggering lost-in-the-middle hallucination.
Simulating a 22-turn real Claude Code / Cursor session with accumulated terminal runs & file reads.
Built directly into the Agent Junky harness to keep coding agent sessions lean, fast, and deterministic.
Identifies superseded command outputs and dead stack traces older than 3 turns in active Claude Code and Cursor sessions. Replaces thousands of dead lines with concise 1-line tombstones, eliminating 40%–70% of re-sent context overhead without breaking thread memory.
When a session has run for hours, summarizing it with an LLM often hallucinates or drops requirements. Agent Junky captures active git diffs, open goals, and architectural decisions into SESSION_STATE.md, resetting context from 80,000 tokens back to 2,500 tokens with 100% memory fidelity.
Audits an entire workspace or subfolder before passing it to Claude or Gemini. Identifies the heaviest 10% of files (like auto-generated schemas or fixtures) that consume 60% of context, allowing selective AST skeletonization.
The complete IDE suite: Active Session Telemetry, Zombie Bloat Pruner, Repo Token Auditor, AST Skeletonizer, and 1-Click MCP Setup.
code --install-extension agentjunky-vscode-1.2.2.vsix cursor --install-extension agentjunky-vscode-1.2.2.vsix Everything you need to know about O(N²) session re-feeding, transcript surgery, and repository tokenomics.
Coding agents (Claude Code, Cursor, Antigravity) are stateless. When you submit turn 20 asking "fix line 4" (a 4-word prompt), the agent does not send just your 4 words. It re-submits the entire cumulative history of turns 1 through 19—including every full-file read, terminal output, and reasoning trace. Your cost scales O(N²) with every subsequent turn, turning a $0.01 prompt into a $0.35 charge on every single keystroke.
Zombie Bloat refers to dead terminal outputs, huge compiler logs, and obsolete stack traces from 10 turns ago that were resolved hours ago but remain frozen in the message array.
Agent Junky's Transcript Surgery (sessionPruner.ts) scans the session file, preserves recent turns intact, and replaces older dead outputs with concise 1-line tombstones (e.g. [Output pruned: 4,200 tokens saved. Build passed. Exit code: 0]). An automated .bak backup is created first. The model retains full awareness of what happened, but you stop paying for thousands of lines of dead terminal output on every subsequent turn.
Native compaction (e.g. in Claude Code) only triggers when context hits a hard ceiling (~90% of maximum tokens). By that point, you have already burned the vast majority of your token budget. Furthermore, auto-compaction relies on lossy LLM summarization, which often hallucinates or forgets critical constraints. In contrast, Agent Junky's State Handover captures your exact active git diffs, open tasks, and architectural decisions into SESSION_STATE.md, resetting context from 80k+ tokens back to ~2.5k tokens with 100% deterministic accuracy.
Running Agent Junky: Audit Workspace Repository Tokens scans your project tree, skips non-code artifacts and lockfiles, and ranks the top culprit files by token weight. It reveals hidden monsters (like a 25,000-token mock database or a monolithic auto-generated client) before you dump them into an agent's context, preventing instant lost-in-the-middle degradation.
The Agent Junky suite supports Claude Desktop, Claude Code CLI, Cursor IDE, Google Antigravity IDE, and standard VS Code. Pricing matrices model Claude 3.7 Sonnet, Claude 3.5 Haiku, OpenAI GPT-4o, and Gemini 2.0 Flash.
In Antigravity IDE: Open the Extensions view (Ctrl+Shift+X), click the ... menu at top-right, choose "Install from VSIX...", and select agentjunky-vscode-1.2.2.vsix (or agentjunky-vscode-latest.vsix). In Cursor or VS Code: Run code --install-extension agentjunky-vscode-1.2.2.vsix from your terminal.
Get practical thinking on agentic AI, enterprise architecture, RAG, and production governance delivered straight to your LinkedIn feed.
Need an architectural review, help transitioning an agent prototype to production, or designing governed tool gateways? Let's connect.