[BUG] claude blocks on startup due to ignoring proxy settings

Status Open
Reported on v2.1.185
Maintainer reply None cached
Activity 5 comments · opened Jul 1, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code takes 6 minutes or longer to respond to the first prompt.

What Should Happen?

Claude should respond within seconds.

Error Messages/Logs

❯ hello                                                                                                                                                                                          

* Beaming… (16m 55s)
  ⎿  Tip: Use /btw to ask a quic

Steps to Reproduce

  1. install code on a linux server behind a firewall, with network access via HTTPS_PROXY env var
  2. configure in .claude/settings.json
{
  "env": {
    "CLAUDE_CODE_USE_BEDROCK": "1",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "global.anthropic.claude-sonnet-5",
    "ANTHROPIC_BEDROCK_ENDPOINT_URL": "https://redacted.bedrock-runtime.us-east-1.vpce.amazonaws.com"
  },
  "autoUpdatesChannel": "latest",
  "awsAuthRefresh": "rm -rf ~/.aws/cli/cache/* 2>/dev/null; aws sts get-caller-identity --profile ai_dev || aws sso login --profile ai_dev --no-browser"
}
  1. start claude
  2. enter a prompt

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.185

Claude Code Version

2.1.197

Platform

AWS Bedrock

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

An strace shows that if awsAuthRefresh is defined Claude will try to connect directly to portal.sso.us-east-1.amazonaws.com, bypassing the HTTPS proxy.
If it is not defined Claude will not try that connection and respond promptly.
The value of awsAuthRefresh does not matter, e.g. "echo dummy" will cause the same behavior".

Refreshing aws auth with the setting above worked correctly in version 2.1.185 (latest stable)

View original on GitHub ↗

4 Comments

bbakker2 · 1 month ago

@claude can you fix yourself?

bbakker2 · 1 month ago

The issue is still present in 2.1.206.
Looks like the same issue occurred last year, and was fixed then: https://github.com/anthropics/claude-code/issues/2607.
@ant-kurt you fixed #2607, could it be the same regression?
@nozaq do you also see the same issue again as you had last year?

bbakker2 · 27 days ago

The issue is still present in v2.1.220:
Running claude wtih strace -o claude.strace -e 'trace=%net' -s 65535 claude:

 grep connect claude.strace
connect(28, {sa_family=AF_INET, sin_port=htons(52105), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
connect(16, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.80.2")}, 16) = 0
connect(13, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("192.168.5.10")}, 16) = 0
connect(13, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("192.168.5.10")}, 16) = -1 EINPROGRESS (Operation now in progress)
connect(13, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.80.2")}, 16) = 0
connect(14, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("52.204.17.243")}, 16) = 0
connect(14, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("44.196.104.60")}, 16) = 0
connect(14, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("34.195.220.130")}, 16) = 0
connect(13, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("52.204.17.243")}, 16) = -1 EINPROGRESS (Operation now in progress)
connect(13, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("44.196.104.60")}, 16) = -1 EINPROGRESS (Operation now in progress)
connect(13, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("34.195.220.130")}, 16) = -1 EINPROGRESS (Operation now in progress)

Shows claude's main process trying to directly connect to public IP addresses, bypasssing the proxy.

bbakker2 · 14 days ago

@claude can you fix this issue yourself?

Showing cached comments. Read the full discussion on GitHub ↗