OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Claude Code Cache Fix

Claude Code Cache Fix is a JavaScript and Node.js developer utility that routes Claude Code API traffic through a local proxy and normalizes request structure to address prompt-cache regressions, including problems reported when sessions resume.

Independent OpenViST project profile, based on linked sources.

Claude Code Cache Fix — Developers investigating prompt-cache behavior in resumed Claude Code sessions
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Consider it when long or resumed Claude Code sessions show sustained low cache-read ratios or repeated cache-creation spikes. The README advises assessing cache health from Claude Code session transcripts first; short sessions with fewer than about 20 requests can give a misleading ratio.

Who it is for

  • Claude Code users seeing repeated cache-creation token spikes or unstable cache-read ratios in long or resumed sessions.
  • Developers who want a local proxy layer to apply request normalization before Claude Code traffic reaches Anthropic.

Documented uses

  • Route Claude Code messages through a local proxy that can normalize request block order, fingerprint and TTL.
  • Use a forward-proxy configuration when keeping Claude Code's Anthropic base URL is important for Remote Control.
  • Use the documented preload approach with Node.js-based Claude Code versions 2.1.112 or earlier.
Before you choose

Requirements & limits

  • The standard reverse-proxy setup changes ANTHROPIC_BASE_URL; on Claude Code 2.1.196 and later, the README says that disables Remote Control, scheduling and claude.ai MCP connectors.
  • Forward-proxy mode is documented as an alternative for keeping Remote Control, but requires trusting a locally generated CA certificate.
  • The preload method applies only to Node.js-based Claude Code 2.1.112 and earlier; the README says it does not work with version 2.1.113 and later's Bun binary.
  • The proxy can inspect and rewrite requests and responses, an inherent part of the documented repair approach.
  • The repository includes an MIT license badge and identifies Node.js 18 or later.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install and start the local proxy

Route Claude Code through the documented local cache-fix proxy.

Before you start

  • Node.js 18 or later, as indicated by the repository
  • npm
  • Claude Code

Steps

  1. Install the package globally with npm install -g claude-code-cache-fix.

  2. Start the server with node "$(npm root -g)/claude-code-cache-fix/proxy/server.mjs".

  3. Launch Claude Code with ANTHROPIC_BASE_URL=http://127.0.0.1:9801 claude.

Expected outcome

Claude Code sends requests through the proxy at localhost:9801, where the default extension pipeline can apply its request normalization.

Guide limitations

  • The documented reverse-proxy setup uses a non-Anthropic ANTHROPIC_BASE_URL; the README says this disables Remote Control, scheduling and claude.ai MCP connectors on Claude Code 2.1.196 and later.
  • The proxy can read and rewrite API requests and responses.
Source-based practical guide

Use forward-proxy mode while retaining Remote Control

Route Claude Code through the proxy without changing its Anthropic base URL.

Before you start

  • Node.js 18 or later, as indicated by the repository
  • npm
  • Claude Code
  • Trust configuration for the proxy's locally generated CA certificate

Steps

  1. Install the package globally with npm install -g claude-code-cache-fix.

  2. Start the proxy with CACHE_FIX_FORWARD_PROXY=on node "$(npm root -g)/claude-code-cache-fix/proxy/server.mjs".

  3. Set HTTPS_PROXY to http://127.0.0.1:9801 and NODE_EXTRA_CA_CERTS to ~/.claude/cache-fix-ca/ca.pem.

  4. Launch Claude Code with those environment variables and leave ANTHROPIC_BASE_URL unset.

Expected outcome

Claude Code keeps its Anthropic base URL and sends traffic through the forward proxy, the mode the README describes for retaining Remote Control.

Guide limitations

  • Forward-proxy mode terminates TLS for api.anthropic.com using a locally generated CA that the client must trust.
  • The README also documents the cache repair proxy as able to read and rewrite API requests and responses.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 November 2026
Original website title
cnighswonger/claude-code-cache-fix · Official homepage title · retained in its source language