A Claude Code user encountered a significant performance issue: full prompt reprocessing with each request.
Problem Analysis
Log analysis revealed that Claude Code was adding a billing header (x-anthropic-billing-header) as a system message. The value of this header changed with each request, forcing the system to reprocess the entire prompt instead of using the KV cache.
Solution
The solution involves disabling the transmission of this header. The user found an online discussion suggesting setting the environment variable CLAUDE_CODE_ATTRIBUTION_HEADER to "0" in the Claude Code settings.json file (typically in ~/.claude/settings.json).
Implementation
After modifying the configuration file, the KV cache returned to normal operation, significantly improving performance.
๐ฌ Comments (0)
๐ Log in or register to comment on articles.
No comments yet. Be the first to comment!