## TL;DR

If it still refuses to appear, flip log-level to debug in agent.cfg and restart to capture the handshake failure.

## Steps

1. [devsecops-kit troubleshooting]: 1) check the service is running with systemctl status buildkite-agent. 2) verify the token on disk. 3) test API connectivity with curl against agent.buildkite.com/v1/agent-info. 4) check the agent logs for the last five minutes. 5) validate the config with buildkite-agent validate. If it still refuses to appear, flip log-level to debug in agent.cfg and restart to capture the handshake failure. For 'No agents available' build failures: confirm the pipeline's required tags match the agent's tags, and check the queue assignment. Long queue times mean the agent's max-run-builds is too low or you need more agents.

## When to use

You are seeing this: [devsecops-kit troubleshooting]: 1) check the service is running with systemctl status buildkite-agent. Use this skill when you run into "Buildkite agent not appearing in the UI: the diagnosis order".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
