Claude Code✓ Confirmed in official docsAdded Nov 24
How to check the connection and turn off response compression when Claude Code replies get cut off behind a proxy
If Claude Code replies stop midway when you work through a corporate proxy, the proxy may be cutting off compressed responses. Version 2.1.331 (November 23) adds both a check for this and an environment variable to work around it.
- First check that the API is reachable. Run the command below in your shell. Its new API connectivity section reports whether the API can be reached, with the HTTP status or the error, or says why it wasn't tested.
claude doctor
- If the connection works but replies still stop midway, set the environment variable that asks for uncompressed model responses and restart Claude Code. The variable is only in the changelog so far and its value format isn't documented, so set it to
1like the otherCLAUDE_CODE_DISABLE_variables.
export CLAUDE_CODE_DISABLE_RESPONSE_COMPRESSION=1
claude
To keep it on, add it to env in ~/.claude/settings.json.
{
"env": {
"CLAUDE_CODE_DISABLE_RESPONSE_COMPRESSION": "1"
}
}
The changelog says it isn't advised yet for self-hosted runners or Remote Control. If you don't have a proxy problem, there's no reason to turn it on.
Sources
Get notified when a new tip lands
Tip alerts only go out in the app. Install it and turn notifications on.