Cache optimization proxy and interceptor for Claude Code that fixes prompt cache bugs, stabilizes request prefixes, and reduces quota burn. Current stable version v4.0.0, released monthly with patch releases as needed. Standalone HTTP proxy (localhost:9801) with 7 hot-reloadable extensions, no wrapper scripts or NODE_OPTIONS needed. Works with all CC versions including Bun binaries v2.1.113+. A/B tested on v2.1.117 showing 95.5% cache hit rate via proxy vs 82.3% direct. Includes Opus 4.7 advisory documenting ~2.4x Q5h consumption and ~3.3x mitigation via CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1. Competes with manual cache workarounds and wrapper scripts.
npm install claude-code-cache-fixNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install the package globally, start the proxy on port 9801, and launch Claude Code pointed at the proxy.
Upgrade Node.js to v18+ or use the Bun binary version of Claude Code.
Use dynamic import() or switch to ESM for your scripts.
Set CACHE_FIX_DISABLE=1 instead of passing --no-cache.
Set CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 to reduce consumption ~3.3x, though complex tasks may degrade.
Enable with CACHE_FIX_THINKING_SANITIZE=on and verify no unintended drops.
Use npm root -g to locate the global node_modules and run node with absolute path.
Use import() or rename file to .mjs and use import syntax.
Run npm install -g claude-code-cache-fix@latest to reinstall with all deps.