Buildkite agent "could not connect" in CI
The Buildkite agent starts but cannot open an HTTPS connection to agent.buildkite.com (or your configured endpoint). Until it connects, the agent never registers and no jobs are picked up.
What this error means
The agent log repeats a connection warning and retries. The agent never shows as "connected" in the Buildkite dashboard and jobs stay queued.
2026-06-30 12:00:01 WARN Failed to find builds to run: Get "https://agent.buildkite.com/v3/...":
dial tcp: lookup agent.buildkite.com: no such host
2026-06-30 12:00:03 WARN Connecting to Buildkite... (attempt 2)Common causes
Outbound HTTPS to the Agent API is blocked
A firewall, security group, or egress proxy blocks port 443 to agent.buildkite.com, so the agent cannot reach the API to register or poll for jobs.
A wrong or unset endpoint
A custom endpoint in the agent config points somewhere unreachable, or DNS on the host cannot resolve the Buildkite hostname.
How to fix it
Open egress and confirm connectivity from the host
- Allow outbound HTTPS (443) to
agent.buildkite.comfrom the agent host or its security group. - From the host, run a direct request to confirm the API is reachable.
- Restart the agent and watch for a successful "Connected to Buildkite" line.
curl -sS -o /dev/null -w "%{http_code}\n" https://agent.buildkite.com/v3Point the agent at the correct endpoint and proxy
If the host uses an egress proxy, export it so the agent inherits it, and leave the default endpoint unless you run Buildkite behind a custom domain.
export HTTPS_PROXY=http://proxy.internal:3128
export NO_PROXY=169.254.169.254
buildkite-agent startHow to prevent it
- Allowlist outbound 443 to the Buildkite Agent API in the agent host network policy.
- Set HTTPS_PROXY/NO_PROXY explicitly on proxied hosts.
- Monitor agent connectivity so a network change surfaces before builds queue.