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.