Home / Blog / Deadweight: What your Claude Code setup costs on every…
Tech News

Deadweight: What your Claude Code setup costs on every request

Murat Sert launched deadweight, an open-source Rust tool that audits Claude Code transcripts to strip unused plugins and reclaim up to 6.8k prompt tokens.

By Dillip Chowdary • Nov 19, 2026 • Source: github.com

Deadweight: What your Claude Code setup costs on every request
Image: github.com

At a glance

Product
deadweight
Author
Murat Sert
Language
Rust
Codebase size
~2,600 lines
License
MIT
Default scan window
30 days

Developer Murat Sert released deadweight, an independent open-source command-line tool designed to audit and eliminate hidden context-token overhead in Claude Code setups. As detailed in github.com's report, every plugin, skill, Model Context Protocol server, and hook automatically injects prompt text into every single outgoing request before a user writes any prompt. In documented test environments, this baseline payload consumes 61.2k tokens on each turn, comprising 41.8k tokens from Claude Code's own system prompt and 18 native tools, alongside 19.4k tokens accumulated from local user configuration.

This analysis details how deadweight inspects local session transcripts, traces token consumption across extensions, and restores prompt capacity through automated cleanup. It applies directly to software engineers and developers running Claude Code who face unexpected rate-limit exhaustion, premature session compaction, or degraded tool selection. By analyzing actual tool execution history, the utility uncovers inactive extensions, alerts users when bloated catalogs strip away skill descriptions, and provides single-command rollback options.

01Session inspection and startup overhead accounting

Claude Code stores complete session histories in the local directory at ~/.claude/projects/. Alongside raw conversation logs, these local files store startup configuration records, including skill listings, deferred tool names, MCP instructions, agent listings, hook outputs, and exact API billing metrics. The deadweight binary reads the billed API tokens directly from the first request of the latest session, measuring combined input, cache-write, and cache-read tokens rather than calculating loose estimates.

The utility matches each startup injection back to its origin file, resolving hook commands against plugin manifests and calculating token weights from character lengths. Historical session logs across the past 30 days are parsed in parallel to tally real-world usage of tools, slash commands, skills, and background subagents. Across a benchmark run scanning 1.4 GB of local transcripts across 41 sessions and over 400 subagent runs, the Rust-based scanner completed its execution in approximately one second.

Note: Claude Code automatically purges transcripts older than the cleanupPeriodDays setting, which defaults to 30 days, limiting historical audits to that sliding window.

02Skill catalog budget limits and truncation

  1. Catalog measurement scans all registered skills and measures total character volume against default system thresholds.
  2. Budget evaluation flags when descriptions exceed the roughly 30,000-character cap defined by the internal skill listing budget.
  3. Context cleanup hides unused items with targeted overrides to restore full functional descriptions for the remaining active tools.

When the total character count across registered skills crosses roughly 30,000 characters, Claude Code drops all descriptions and presents skills to the model as bare names. In sample runs containing 214 skills, 151 entries lost their descriptive metadata, preventing the model from recognizing when to execute them. Users can manually expand the listing budget by setting skillListingBudgetFraction to 0.02 in settings.json instead of the 0.01 default, though that change consumes up to roughly 8.3k additional tokens per turn.

03Audit metrics and token reduction impact

Metric or ResourceUnoptimized SetupOptimized with FixMeasured Difference
Total Base Request Tokens61.2k tokens~54.4k tokens6.8k tokens saved
User Setup Overhead19.4k tokens~12.6k tokens35% reduction
Registered Skills214 listed203 visible11 unused hidden
Active Plugins6 unused active0 unused active6 disabled
Skill Listing Budget Fraction0.01 (~30k chars)0.02 (optional)+8.3k tokens if raised

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

Excessive startup overhead drains user usage allowances continuously because tokens are resent on every conversational turn across every session. High base overhead also fills the overall context window prematurely, triggering automatic context compaction earlier in workflows and causing the assistant to lose track of prior project tasks. Running the automated fix command immediately disables unused plugins and hides unused skills, cutting roughly 6.8k tokens per request without removing required functionality.

04Local deployment and plugin management

Command
cargo install deadweight
Command
deadweight
Command
deadweight fix --dry-run
Command
deadweight fix

Installation is available via Cargo or by downloading standalone prebuilt binaries for macOS, Linux, and Windows from GitHub Releases. Users can run the command-line interface directly in their terminal or integrate it into Claude Code by registering the marketplace repository through the in-app command /plugin marketplace add msertdev/deadweight and installing it with /plugin install deadweight@deadweight. Once installed, triggering /deadweight runs an audit inside the active session, adding a single short index entry of approximately 18 tokens to the skill table.

To inspect potential changes before applying them, developers can execute a dry run or review specific scopes using dedicated command-line flags. Passing deadweight fix inspects modifications interactively and requests user approval before writing adjustments to local configuration files. If an adjustment needs to be rolled back, running deadweight undo reads the latest timestamped backup and restores settings.json to its prior state.

05Configuration safety and scope isolation

All modifications performed by the tool operate locally without network access and employ non-destructive update patterns. Plugins are toggled off inside settings.json under enabledPlugins rather than uninstalled, while inactive user skills receive a user-invocable-only classification under skillOverrides so manual slash commands continue to work. The audit leaves MCP server configurations untouched in .claude.json, printing the exact commands required to prune them or suggesting that globally scoped servers be moved into project-specific configurations.

Automated fixes require at least five recorded sessions before executing, preventing misattribution caused by sparse history logs. In addition, plugins that execute hooks are excluded by default to avoid breaking background safety routines, unless explicitly targeted using the include-hooked flag. Every modification writes a complete backup manifest and settings snapshot to ~/.claude/deadweight/backups/ to allow immediate recovery.

Frequently asked questions

What causes Claude Code to drop skill descriptions from the prompt?

Claude Code caps the global skill listing at roughly 30,000 characters. When extension skills exceed this character ceiling, Claude Code strips their descriptions and lists them as bare names, preventing the model from knowing when to invoke them.

How does deadweight modify local configuration files safely?

It creates timestamped backups in ~/.claude/deadweight/backups/ before touching configuration files, asks for confirmation, disables plugins rather than deleting them, and provides a deadweight undo command to revert changes.

Why are plugins that use hooks skipped during automatic fixes?

Plugins that execute hooks often run automated background routines such as safety checks or memory management that do not leave explicit tool-call logs, so deadweight skips them unless the include-hooked flag is passed.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →