@@ -109,6 +109,72 @@ configured to use the forward proxy. See
109109[ Monitoring network activity] ( security/policy.md#monitoring )
110110for details.
111111
112+ ## API calls fail with a certificate error
113+
114+ If your organization uses a proxy that inspects HTTPS traffic, agent requests
115+ can fail with a certificate error such as
116+ ` SSL certificate problem: self-signed certificate in certificate chain ` . Install
117+ your organization's internal root CA inside the sandbox so the agent and its
118+ SDKs trust certificates signed by the proxy. Certificate errors can stop a
119+ request before the credential proxy can inject credentials.
120+
121+ For repeatable setup, create a [ sandbox kit] ( customize/kits.md ) that installs
122+ the CA when the sandbox is created:
123+
124+ ``` text
125+ internal-ca/
126+ |-- spec.yaml
127+ `-- files/
128+ `-- home/
129+ `-- internal-ca.crt
130+ ```
131+
132+ Use a PEM-encoded certificate with a ` .crt ` extension. If traffic can be signed
133+ by more than one internal proxy, include each proxy's root CA in the kit and
134+ install each certificate before running ` update-ca-certificates ` .
135+
136+ Add this ` spec.yaml ` :
137+
138+ ``` yaml {title="internal-ca/spec.yaml"}
139+ schemaVersion : " 1"
140+ kind : mixin
141+ name : internal-ca
142+
143+ environment :
144+ variables :
145+ NODE_EXTRA_CA_CERTS : /usr/local/share/ca-certificates/internal-ca.crt
146+
147+ commands :
148+ install :
149+ - command : " install -m 0644 /home/agent/internal-ca.crt /usr/local/share/ca-certificates/internal-ca.crt && update-ca-certificates"
150+ user : " 0"
151+ description : Install internal CA certificate
152+ ` ` `
153+
154+ Create a sandbox with the kit:
155+
156+ ` ` ` console
157+ $ sbx run claude --kit ./internal-ca/
158+ ```
159+
160+ To update an existing sandbox, copy the certificate into the sandbox and update
161+ the trust store:
162+
163+ ``` console
164+ $ sbx cp ./internal-ca.crt < sandbox-name> :/tmp/internal-ca.crt
165+ $ sbx exec < sandbox-name> -- sudo install -m 0644 /tmp/internal-ca.crt /usr/local/share/ca-certificates/internal-ca.crt
166+ $ sbx exec < sandbox-name> -- sudo update-ca-certificates
167+ ```
168+
169+ Some Node.js-based agents and SDKs use their own certificate store. Set
170+ ` NODE_EXTRA_CA_CERTS ` inside the sandbox, as shown in the kit example, so those
171+ clients also trust the internal CA.
172+
173+ If API calls still fail after installing the CA, run ` sbx policy log ` and check
174+ whether the request used ` forward ` , ` forward-bypass ` , or ` transparent ` in the
175+ ** PROXY** column. That can help identify whether the request is eligible for
176+ credential injection or is reaching an upstream proxy directly.
177+
112178## Docker build export fails with an ownership error
113179
114180Running ` docker build ` with the local exporter (` --output=type=local ` or `-o
0 commit comments