Releases: cnighswonger/claude-code-cache-fix-vscode
Release list
v0.8.2 — Debug log file
Debug log file — preload-style per-request diagnostics
When the debug setting is enabled, the extension now writes rich per-API-call diagnostics to ~/.claude/cache-fix-debug.log — matching the format from the old preload interceptor (pre-v0.7.0).
What gets logged per API call
- Model, message count, system blocks, tool count
- User/assistant turns, content blocks, image count
- Tool result stats (microcompact-cleared count, budget warnings at 150K+ chars)
cache_controlpresence,cc_version- Skipped fixes (from
CACHE_FIX_SKIP_*env vars) - Cache token stats:
read/creation/inputwith hit ratio percentage - Output tokens and request→response latency
- Cache regression warning when read ratio stays below 50% for 5+ calls
- Proxy stderr (pipeline load errors, TLS warnings) interleaved
How it works
The extension deploys a custom debug-log.mjs proxy extension (order 10, runs first) into the installed npm package's extensions directory. It uses the same pipeline hooks as all other extensions (onRequest, onStreamEvent) and writes directly to the log file via appendFileSync.
Install
code --install-extension claude-code-cache-fix-0.8.2.vsix
Enable CCC: Debug in Settings, reload, and check ~/.claude/cache-fix-debug.log.
v0.8.1 — Gap analysis fixes (3 HIGH, 4 MEDIUM, 9 LOW)
Bugfix release from a 4-agent parallel gap analysis (logic, UX, stack, perf reviewers).
HIGH fixes
noProxydefault silently overrode systemNO_PROXY— corporate users behind Zscaler/Netskope had their bypass rules replaced bylocalhost,127.0.0.1,::1,.local. Default changed to""with proper fallback chain.fetchLatestVersiondidn't follow HTTP redirects — Node'shttps.requestdoesn't auto-follow 3xx. Users behind corp registry mirrors (Artifactory, Verdaccio, GitLab) got silent update-check failures. Added 1-hop redirect handler.- Config change handler: proxy restart before port release —
stopProxyServer()sends kill but the OS needs time to free port 9801. The new proxy spawn could see the dying process as "already-external" and not start. Added post-stop port-release wait.
MEDIUM fixes
- 300ms debounce on config changes — pasting a settings block or cert auto-export triggering
caFilewrite no longer cascades into multiple stop/start cycles. fetchLatestVersionmissingHTTP_PROXYfallback — users with onlyHTTP_PROXYset (noHTTPS_PROXY) got silent update failures.semverGtpre-release handling —3.2.0was not detected as greater than3.2.0-rc.1, skipping upgrades from pre-release to stable.fetchLatestVersiontimeout 3000ms → 1500ms — halves worst-case activation delay.- Description fixes for
autoStartProxy,thinkingDisplay,usageLog.
LOW fixes
- CRLF normalization on
outputEfficiencyReplacement(Windows multiline text). markdownEnumDescriptionsforthinkingDisplaydropdown.maximumconstraints onimageMaxDim(8192) andimageRequestSizeMax(200MB).maxLength: 4096onoutputEfficiencyReplacement.- Stale JSDoc reference
v3.1.0→v3.6.1. imageKeepLastdescription explains why default is 0 despite recommending 3.
Install
code --install-extension claude-code-cache-fix-0.8.1.vsix
v0.8.0 — Sync to upstream 3.6.1, debug mode, image management, 31 settings
Syncs the extension to upstream claude-code-cache-fix@3.6.1. Auto-update (v0.7.3) means most users already have the npm package — this release wires its new features into VS Code Settings.
New settings (14 added, 31 total across 6 sections)
Debug mode
debug— setsCACHE_FIX_DEBUG=1. Was impossible to enable from VS Code settings before.
Image management (5 settings)
imageKeepLast— keep images in last N user messages (recommended: 3)imageGuard— full v3.3.0 image pipeline (strip + resize + size guard)imagePreserveDetail— Lanczos resize viasharpinstead of strippingimageMaxDim— max image dimension in pixelsimageRequestSizeMax— max total request size in bytes
Behavioral tweaks (4 settings)
thinkingDisplay—summarized/omitted/disabled(Opus 4.7 thinking summaries)outputEfficiencyReplacement— custom system prompt sectionoverageWarning— cost overage warnings per Q5h windownormalizeMicrocompact— stabilize microcompact sentinel strings
Diagnostics (4 settings)
prefixDiff— snapshot request prefixes for diffinginjectMessagesBreakpoint— opt-in breakpoint #3 injectionupstreamDetection— detect when Anthropic changes CC request structureusageLog— per-call usage log (claude-meter compatible)
Pipeline extensions synced to 3.6.1
6 default-on extensions were missing from our override in v0.7.x (silently not running):
ttl-tier-detect (75), image-strip (150), microcompact-stability (350), thinking-display (360), messages-cache-breakpoint (410), overage-warning (610).
Override now has 17 entries matching upstream, with request-log forced on.
Install
code --install-extension claude-code-cache-fix-0.8.0.vsix
v0.7.3 — Auto-update on every activate
What's new
Auto-update on every activate
Previously the auto-install only triggered when claude-code-cache-fix was missing. Result: you'd install once, get a version pinned, and never see upstream releases. v0.7.3 fixes that — every activate hits registry.npmjs.org/claude-code-cache-fix/latest (~200ms direct HTTPS, no npm spawn), compares against the locally installed version, and runs volta install claude-code-cache-fix@latest (or npm install -g) if there's a newer release.
Honors corporate httpsProxy / caFile / rejectUnauthorized for users behind Zscaler / Netskope.
Self-lock guard
The package directory is locked while our proxy runs out of it. If volta/npm tried to rm -rf mid-update, it would leave the install half-removed (zombie state). v0.7.3 probes port 9801 first — if anything is listening (proxy from another VS Code window, or a zombie from a prior session), it skips the update for this activate and retries on the next one. The check runs before we spawn our own proxy, so there's no self-lock.
Settings section titles shortened
Claude Code Cache Fix: Activation → CCC: Activation, etc. VS Code already groups settings under "Claude Code Cache Fix" as the parent — the duplicated prefix was pushing the actual section name off-screen on narrow Settings panels.
What you'll see in the proxy output channel
Up to date:
[2026-04-25T...] Update check: installed 3.1.1 is up to date (latest 3.1.1).
Update found:
[2026-04-25T...] Update available: 3.1.0 → 3.1.1. Installing.
[2026-04-25T...] Cache Fix: updating 3.1.0 → 3.1.1 via volta…
[2026-04-25T...] Updated to 3.1.1.
Locked (multi-window or zombie proxy):
[2026-04-25T...] Update check skipped: port 9801 is already in use, can't safely upgrade. Will retry next activate.
Install
code --install-extension claude-code-cache-fix-0.7.3.vsix
If you're on claude-code-cache-fix@3.1.0 (or older), reload VS Code after install — v0.7.3 will detect 3.1.1 is out and upgrade automatically before spawning the proxy.
If you ever land in a half-uninstalled state
If a volta install was interrupted (Ctrl+C, system crash, etc.) and the package dir is partial, just run from a terminal:
volta install claude-code-cache-fix@latest
It cleans up and reinstalls. No need to do anything in VS Code.
v0.7.2 — Route via process.env (real fix for stale ANTHROPIC_BASE_URL)
Real fix for the stale-ANTHROPIC_BASE_URL bug
v0.7.1's attempt to clean up claudeCode.environmentVariables in deactivate() didn't work — VS Code unloads the extension before the async settings write commits, and the entry stayed in settings.json. v0.7.2 stops writing to settings.json entirely.
The new approach: process.env
All VS Code extensions in a window share a single Node.js extension host process — and therefore one process.env. Claude Code's spawn explicitly merges process.env with the user setting when launching claude (verified in anthropic.claude-code 2.1.120):
function OV(V) {
let K = _14(e6("environmentVariables")),
B = { ...process.env }; // ← inherits parent env
if (V) B.PATH = V;
B.MCP_CONNECTION_NONBLOCKING = "true";
for (let x of K) if (x.name) B[x.name] = x.value || "";
return B.CLAUDE_CODE_ENTRYPOINT = "claude-vscode", B;
}So we just set process.env.ANTHROPIC_BASE_URL = 'http://127.0.0.1:9801' in our activate(). Claude Code's subprocess inherits it. Nothing persists to disk.
Why this is reliable
process.env is in-memory state of the extension host. Modification is synchronous. deactivate() does a synchronous delete process.env.ANTHROPIC_BASE_URL (or restores the prior value if there was one) before VS Code unloads us. No async race with the settings service. No stale settings.json entry possible.
When VS Code restarts with our extension uninstalled: extension host starts fresh, nothing for Claude Code to inherit, traffic goes direct to api.anthropic.com. Clean.
Automatic migration
If you have a stale ANTHROPIC_BASE_URL entry left behind by 0.6.x / 0.7.0 / 0.7.1: install v0.7.2 and the entry is removed automatically on activate (cleanupLegacyEnvSetting). Conservative — only removes entries whose value contains 127.0.0.1. User-set values (corp proxy, AWS Bedrock router) are left alone.
Preserves your existing ANTHROPIC_BASE_URL
If you have ANTHROPIC_BASE_URL set to a non-proxy URL in your shell (or another tool sets it), we save the prior value before overriding and restore it on deactivate. Enable Proxy Mode prompts before replacing an explicit non-proxy value.
Install
code --install-extension claude-code-cache-fix-0.7.2.vsix
If you were stuck with the 0.7.1 bug, just install v0.7.2 — no manual cleanup needed.
Verify
After install, open user settings.json. The ANTHROPIC_BASE_URL entry should be gone from claudeCode.environmentVariables. The proxy should still be live (Show Status → "Proxy listening: Yes"), and the proxy log at ~/.claude/cache-fix-proxy-log.ndjson should still receive entries on each Claude Code call.
v0.7.1 — Fix stale ANTHROPIC_BASE_URL on deactivate
Bugfix release
Fixes a latent bug present since 0.6.0. Recommended for everyone on 0.6.x or 0.7.0.
What was broken
When you disabled or uninstalled the extension, the proxy child process stopped — but the ANTHROPIC_BASE_URL=http://127.0.0.1:9801 entry the extension had written into your claudeCode.environmentVariables setting persisted in settings.json. Claude Code in VS Code would then try to connect to a dead 127.0.0.1:9801 on every request and fail with:
[ERROR] API error (attempt 1/11): undefined Connection error.
Terminal claude was unaffected — it doesn't read the VS-Code-only claudeCode.environmentVariables setting.
What's fixed
deactivate() now removes the ANTHROPIC_BASE_URL entry it wrote on activate. The cleanup is conservative — only entries whose value contains 127.0.0.1 are removed, so user-set values (corp proxy, mitmproxy, custom upstream) are left alone.
Tradeoff
deactivate() also fires on VS Code window close, so the setting will be removed on shutdown and re-added on next activate. Minor settings.json churn — one entry toggling on/off per VS Code lifecycle. This is the price for not silently breaking on uninstall.
If you're already broken
Either:
- Install v0.7.1 and let the next disable/enable cycle clean it up.
- Or manually edit
settings.json(Cmd/Ctrl+Shift+P → "Preferences: Open User Settings (JSON)") and remove theANTHROPIC_BASE_URLentry fromclaudeCode.environmentVariables.
Install
code --install-extension claude-code-cache-fix-0.7.1.vsix
v0.7.0 — Drop wrapper, sync upstream v3.1.0
Highlights
Tracks upstream claude-code-cache-fix@3.1.0 and drops preload-mode wrapper support entirely. Proxy mode is the only mode now — preload didn't work on the Bun-binary CC (v2.1.113+) anyway, and the 67 MB Windows wrapper .exe was costing every user on every download.
VSIX size: ~30 MB → ~20 KB (7 files).
What changed
Removed — preload mode + wrapper
- Deleted
ClaudeCodeCacheFixWrapper.exe(67 MB) andwrapper.js. - Removed commands
Enable/Disable(preload). Proxy commandsEnable Proxy Mode/Disable Proxy Moderemain. - Removed 13 preload-only settings (
skipRelocate,skipContinueTrailerStrip,skipReminderStrip,skipCacheControlSticky,normalizeIdentity,normalizeCwd,normalizeSmoosh,imageKeepLast,stripGitStatus,outputEfficiencyReplacement,debug, etc.). - On activate, leftover
claudeCode.claudeProcessWrappersettings written by 0.6.x are cleared (only when the path looks like ours).
Added — sync to v3.1.0 upstream defaults
Three previously dormant proxy extensions are now enabled by default; the override file at ~/.claude/cache-fix-proxy-extensions.json mirrors that. Real-world testing of these together recovered cache hit rate from 5.9% → 99.9% in ~2 calls.
smoosh-split(order 320) — peelssystem-reminderblocks out of tool results.content-strip(order 330) — removes per-turn bookkeeping text.tool-input-normalize(order 340) — cache-stable JSON serialization fortool_useinputs.
Plus two env-var-controlled extensions, both wired through VS Code settings:
prefix-diff— opt-in viaprefixDiffsetting (now actually wiresCACHE_FIX_PREFIXDIFF=1).deferred-tools-restore— default-on; opt-out viaskipDeferredToolsRestore. Addresses MCP reconnect race conditions.
Changed — settings now actually wire to the proxy
In 0.6.x the proxy-mode skip* settings only updated the (now-deleted) preload wrapper config — they had no effect on the proxy. Fixed: every skip* toggle now flips the corresponding extension's enabled flag in the override file before each proxy spawn, and changes restart the running proxy automatically.
Settings panel collapsed from 5 sections / 28 toggles to 3 sections / 17 toggles. Less surface, every remaining knob does something.
Migration
Settings reused with new wiring:
skipSmooshSplit— was preload-only, now flips proxysmoosh-split.skipDeferredToolsRestore— was preload-only, now sets the proxy env var.prefixDiff— was preload-only, now sets the proxy env var.
Setting renamed: skipToolUseInputNormalize → skipToolInputNormalize. Copy your value over; VS Code marks the old key as "Unknown configuration setting".
Settings deleted (no proxy equivalent yet upstream): skipRelocate, skipContinueTrailerStrip, skipReminderStrip, skipCacheControlSticky, normalizeIdentity, normalizeCwd, normalizeSmoosh, imageKeepLast, outputEfficiencyReplacement, debug. For stripGitStatus, use the native CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1 env var (works on Bun-binary CC too).
Compatibility
- Requires
claude-code-cache-fix@>=3.0.1for proxy at minimum;>=3.1.0for the new default-on extensions and env-var-controlled features. httpsProxy/noProxyend-to-end honored only on>=3.0.3.- Auto-installed via
volta installornpm install -gif missing on activate.
Full migration guide in CHANGELOG.md.
Install
Download claude-code-cache-fix-0.7.0.vsix below, then:
code --install-extension claude-code-cache-fix-0.7.0.vsix
On first activate the extension installs claude-code-cache-fix@latest (which will be 3.1.0+) automatically. Restart any active Claude Code session afterward.
v0.6.1 — Settings UX overhaul
What's New
Settings UX overhaul. Every one of the 28 settings now has a real markdown description citing the upstream extension-impact-guide — what the fix does, effect when toggled, measured cost of skipping, deep link to the guide's anchor.
Settings are grouped into five labeled sections in the VS Code Settings UI so the 28 toggles don't flatten into one alphabetized wall:
- Activation —
autoStartProxy,autoInstallInterceptor,debug,prefixDiff - Corporate environments —
httpsProxy,noProxy,caFile,rejectUnauthorized,autoExportCerts,certSearchPatterns - Proxy-mode fixes (CC v2.1.113+) —
skipFingerprint,skipToolSort,skipSessionStartNormalize,skipCacheControlNormalize,skipTtl - Preload-mode fixes (CC ≤v2.1.112) —
skipRelocateand friends, plusnormalize*opt-ins - Prompt & image rewrites —
imageKeepLast,stripGitStatus,outputEfficiencyReplacement
Preload-only settings carry a leading > ⚠️ **Preload-mode only** — no effect on CC v2.1.113+ callout so users on recent CC don't chase settings that do nothing for them.
stripGitStatus description now points users at the native CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1 flag (same effect, no interceptor, works on Bun-binary CC too).
Before vs after (example: skipFingerprint)
Before v0.6.1:
Disable the fingerprint stabilization fix
After v0.6.1:
Fix: Strips the unstable
cc_versionfingerprint from the system prompt before forwarding…Cost of skipping: In a validated 7.5-hour Windows session (536 calls), 81% of calls had fingerprint instability — each one a full cache miss (~6-30K tokens of
cache_creation). Cache hit rate drops from 95-99% to 60-80% on resume sessions.See impact guide.
All 28 settings got similar treatment, with real numbers pulled from the impact guide where the guide provides them.
What didn't change
- Setting keys are unchanged —
skipFingerprintstaysskipFingerprint, all existingsettings.jsonentries work identically. - No runtime behavior change —
extension.jsis untouched. Purely a description/grouping overhaul. - No compatibility change — same pairing as v0.6.0: works with
claude-code-cache-fix@>=3.0.1;httpsProxyend-to-end requires@>=3.0.3.
Install
code --install-extension https://github.com/cnighswonger/claude-code-cache-fix-vscode/releases/download/v0.6.1/claude-code-cache-fix-0.6.1.vsix
Or download the VSIX below and use Extensions → ⋯ → Install from VSIX…
Full list of per-setting diffs in CHANGELOG.md.
v0.6.0 — Zero-touch activation + corporate env support
What's New
Zero-touch activation — install the VSIX, restart VS Code, done. No command-palette steps, no node server.mjs & in a terminal, no "copy this command and paste it" popups. The extension auto-installs the claude-code-cache-fix npm package (via volta install on Volta-managed systems, else npm install -g), self-spawns the proxy server as a managed child, wires ANTHROPIC_BASE_URL into the right settings shape, and cleans up on VS Code close.
Corporate environment support — works behind Zscaler / Netskope / Forcepoint / Bluecoat / custom-CA SSL inspection out of the box. Six new settings cover HTTP proxy URL, NO_PROXY, CA file path, TLS-verify toggle, and (Windows only) auto-export from the certificate store. Two new commands: Export Windows Corporate Certificates and Test Connection to Anthropic API.
Two high-severity fixes from v0.5.0:
- Proxy mode never actually engaged —
claudeCode.environmentVariablesis an array of{name, value}objects, butenableProxywrote it as a flat map, soANTHROPIC_BASE_URLwas silently dropped at JSON serialization time. Now writes the correct shape while preserving existingCACHE_FIX_*entries. claudeCode.claudeProcessWrapperrotted on every extension update (pointed at the versioned extension folder). Now mirrors the bundled.exeto a stable per-user location and self-heals stale paths on every activate.
Volta-aware interceptor lookup — npm root -g doesn't see volta install'd packages. The extension now also checks <VOLTA_HOME>/tools/image/packages/... and tools/shared/.
NDJSON request log — ~/.claude/cache-fix-proxy-log.ndjson gets one line per /v1/messages with timestamp, model, latency, tokens, cache-read, cache-create. New command: Open Proxy Request Log. Doubles as a real cache-hit-rate signal: cacheRead / (cacheRead + cacheCreation).
New settings
| Setting | Default | Purpose |
|---|---|---|
autoStartProxy |
true |
Silently start proxy mode on activate |
autoInstallInterceptor |
true |
Install the npm package if missing (volta/npm) |
httpsProxy |
"" |
Corporate HTTP(S) proxy URL |
noProxy |
localhost,127.0.0.1,::1,.local |
Hosts to bypass the proxy |
caFile |
"" |
Path to PEM bundle with extra CA certificates |
rejectUnauthorized |
true |
TLS verification (warns loudly when disabled) |
autoExportCerts |
false |
(Windows) Auto-export from cert store |
certSearchPatterns |
["*Zscaler*", "*Netskope*", "*Forcepoint*"] |
Subject patterns to match |
Compatibility
- Requires
claude-code-cache-fix@>=3.0.1for proxy mode. ThehttpsProxysetting is end-to-end only on@>=3.0.3, where the upstream agent wiring lives (merged via cnighswonger/claude-code-cache-fix#54); on older versions the env vars still propagate but the proxy server ignores them. - No regression for users without corp-env settings — with no env vars set, proxy behavior is identical to prior versions (default Node agent, system trust store).
- Tested on Windows 11 + Volta-managed Node 22.22.0 and Windows Server 2025 + plain npm. Code Insiders, stable VS Code, and Cursor all resolve the extension correctly.
Install
code --install-extension claude-code-cache-fix-0.6.0.vsix
Or download the .vsix below and use Extensions → ⋯ → Install from VSIX…
Credits
Upstream proxy agent wiring (the piece that makes httpsProxy actually work end-to-end) landed in claude-code-cache-fix@3.0.3 via #54 — thanks @cnighswonger for the review and merge. The Windows pipeline-path fix in @3.0.2 also traces back to the same audit pass (#52).
Full details in CHANGELOG.md.
v0.5.0 — Proxy mode for CC v2.1.113+
What's New
Adds proxy mode for Claude Code v2.1.113+ (Bun binary) where the preload wrapper no longer works.
New Commands
- Claude Code Cache Fix: Enable Proxy Mode — sets
ANTHROPIC_BASE_URLto route CC through the local cache-fix proxy - Claude Code Cache Fix: Disable Proxy Mode — removes the proxy routing
How It Works
- Install the npm package:
npm install -g claude-code-cache-fix@latest(v3.0.1+) - Start the proxy:
node "$(npm root -g)/claude-code-cache-fix/proxy/server.mjs" & - Run Enable Proxy Mode from the VS Code command palette
- Restart any active Claude Code session
The proxy applies 7 cache-fix extensions automatically. A/B tested on v2.1.117: 95.5% hit rate through proxy vs 82.3% direct.
Existing Features
Preload mode (Enable/Disable commands) is preserved for users pinned to CC v2.1.112 or earlier. Status command now shows current mode (Proxy/Preload/Disabled).
Reported by Alexander (X-15).