cnighswonger

Fixes prompt cache regression in Claude Code that causes up to 20x cost increase on resumed sessions

46
3
100% credibility
Found Apr 12, 2026 at 46 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
JavaScript
AI Summary

A patch and monitoring tool that fixes cost explosions and context issues in resumed sessions of Anthropic's Claude Code AI coding assistant.

How It Works

1
😩 Hit Unexpected High Costs

You're using your AI coding helper for long sessions, but resuming them suddenly costs way more than expected.

2
🔍 Discover the Fix

You learn about this helpful patch that solves the hidden cost spikes in resumed AI chats.

3
📦 Add the Helper Easily

Grab the fix with a simple download, ready to team up with your AI tool.

4
🔧 Set Up Your Shortcut

Make a quick custom launcher so your AI sessions automatically use the smarter version.

5
▶️ Resume Sessions Normally

Jump back into your ongoing AI projects just like always, but now everything runs smoother.

6
💰 See Instant Savings

Watch your costs drop dramatically, with logs showing exactly how much you're saving.

🎉 AI Work Flows Cheaply

Your coding assistant stays efficient and affordable, even in marathon sessions.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 46 to 46 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is claude-code-cache-fix?

This JavaScript preload module fixes prompt cache regressions in Claude Code's npm version, preventing up to 20x cost increases on resumed sessions caused by message drift, unstable fingerprints, and tool ordering chaos. Install via npm, then run Claude Code through a simple wrapper script or alias with NODE_OPTIONS="--import claude-code-cache-fix" to normalize API requests before they hit Anthropic's servers. It also strips bloated base64 images from history and logs usage to JSONL for cost analysis.

Why is it gaining traction?

Developers notice instant cache hit restoration on resumes, slashing bills from $5-10/hour back to $0.50/hour, plus bonus monitoring for quota drains, peak-hour throttling, and silent microcompacts. Bundled CLI tools generate cost reports and cache tests, while env vars enable image stripping or system prompt tweaks—prompt fixes that close multiple GitHub issues without waiting for official patches. Community contributors track fixes vs closes in commit messages, making it a go-to for command prompt fixes in Claude workflows.

Who should use this?

Claude Code power users running multi-hour coding sessions that resume often, like AI agent builders or solo devs debugging large repos. Teams monitoring Anthropic quotas during peak hours (13:00-19:00 UTC weekdays) or analyzing cache TTL drops from overages. Anyone using the npm CLI—not the standalone binary—who wants github fixes for syntax and cache bugs without proxy hassles.

Verdict

Grab it if you're on Claude Code npm and burning cash on resumes; 46 stars and 1.0% credibility score reflect early maturity, but thorough docs and test scripts make it production-ready for cost-sensitive workflows. Test with its cache script first to confirm your 20x savings.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.