Corporate Proxies
Make agentty work behind TLS-terminating forward proxies.
on this page
Behind a SOCKS proxy, start agentty like this:
AGENTTY_SOCKS_PROXY=127.0.0.1:1080 agenttyBehind a proxy that re-encrypts traffic (Zscaler, Bluecoat, mitmproxy), install the proxy's CA certificate into the system trust store. The sections below explain both.
SOCKS proxies
SOCKS does not terminate TLS. agentty checks certificates exactly as it does on a direct connection. This is also why air-gap mode is safe over an untrusted network.
TLS-terminating proxies (Zscaler, Bluecoat, mitmproxy)
These proxies re-encrypt traffic with their own CA. Install that CA into the system trust store. agentty loads system roots at startup.
# Debian / Ubuntu
sudo cp corp-proxy-ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
# Fedora / RHEL
sudo cp corp-proxy-ca.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trustStreaming through corporate VPNs
Some endpoint-security gateways keep the connection open but hold back model events. Short replies then arrive in one burst. Older agentty builds stopped larger tasks with stream stalled — no events for 120s. Current builds:
- ask for
no-cache, no-transformand uncompressed event streams, - count HTTP/2 control traffic as a sign the connection is alive, with a hard deadline still in place,
- fall back to incremental TLS HTTP/1.1 streaming when a gateway removes
h2from ALPN.
If you see that exact 120-second error, update agentty. Replies may still arrive in bursts when company policy forces buffering. agentty can't make a gateway release bytes it holds back. The request keeps going instead of being cancelled, as long as the connection stays up.
Last resort: turn off verification
If you can't install the CA, you can disable peer verification:
AGENTTY_INSECURE=1 agentty