Skip to content

Fix proxy/cert auto-detection in cloud_default remote environments - #15

Merged
a5m0 merged 1 commit into
mainfrom
claude/auto-proxy-env-var-mismatch-FtoJ3
May 23, 2026
Merged

Fix proxy/cert auto-detection in cloud_default remote environments#15
a5m0 merged 1 commit into
mainfrom
claude/auto-proxy-env-var-mismatch-FtoJ3

Conversation

@a5m0

@a5m0 a5m0 commented May 23, 2026

Copy link
Copy Markdown
Owner

Browser launches hit ERR_CERT_AUTHORITY_INVALID in cloud environments
(CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE=cloud_default). These route egress
through a transparent proxy that intercepts TLS with a CA Chrome does not
trust, and they set no HTTPS_PROXY variable. The previous detection
required HTTPS_PROXY to be present, so the certificate handling and
headless configuration never fired.

Decouple "are we remote" from "is an explicit proxy configured":

  • Add is_claude_code_remote_environment() keyed on CLAUDE_CODE_REMOTE or
    CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE.
  • Apply --ignore-certificate-errors and ignore_https_errors in any remote
    environment; only start the auth proxy wrapper when HTTPS_PROXY is set.
  • Mirror the same detection and cert handling in chrome-instance.sh.

Also fix the SessionStart hook command so plugin installs resolve the
script via CLAUDE_PLUGIN_ROOT, falling back to CLAUDE_PROJECT_DIR for
direct repo usage.

https://claude.ai/code/session_019pW3wkgk6iEzgSjd1cVTtt

Browser launches hit ERR_CERT_AUTHORITY_INVALID in cloud environments
(CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE=cloud_default). These route egress
through a transparent proxy that intercepts TLS with a CA Chrome does not
trust, and they set no HTTPS_PROXY variable. The previous detection
required HTTPS_PROXY to be present, so the certificate handling and
headless configuration never fired.

Decouple "are we remote" from "is an explicit proxy configured":
- Add is_claude_code_remote_environment() keyed on CLAUDE_CODE_REMOTE or
  CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE.
- Apply --ignore-certificate-errors and ignore_https_errors in any remote
  environment; only start the auth proxy wrapper when HTTPS_PROXY is set.
- Mirror the same detection and cert handling in chrome-instance.sh.

Also fix the SessionStart hook command so plugin installs resolve the
script via CLAUDE_PLUGIN_ROOT, falling back to CLAUDE_PROJECT_DIR for
direct repo usage.

https://claude.ai/code/session_019pW3wkgk6iEzgSjd1cVTtt
@a5m0
a5m0 merged commit a4bc777 into main May 23, 2026
1 check passed
@a5m0
a5m0 deleted the claude/auto-proxy-env-var-mismatch-FtoJ3 branch May 23, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants