Fix proxy/cert auto-detection in cloud_default remote environments - #15
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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":
CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE.
environment; only start the auth proxy wrapper when HTTPS_PROXY is set.
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