원클릭으로
agent-troubleshooting
Diagnoses Buildkite agent issues like stuck jobs and queue mismatches.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Diagnoses Buildkite agent issues like stuck jobs and queue mismatches.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Analyzes failed Buildkite builds to identify root causes and provide fixes.
Shows recent Buildkite build status for a pipeline with pass/fail visibility.
Triggers new Buildkite builds with branch/commit control and safety confirmations.
Unblocks Buildkite builds waiting for manual approval.
Retrieves and displays Buildkite job logs. For debugging failures, use build-debugging instead.
Helps write and improve Buildkite pipeline YAML configurations.
| name | agent-troubleshooting |
| description | Diagnoses Buildkite agent issues like stuck jobs and queue mismatches. |
Diagnose why jobs aren't being picked up by agents.
| Tool | Purpose |
|---|---|
get_build | Get job details including agent requirements |
list_clusters | List available clusters |
get_cluster | Get detailed cluster information |
list_cluster_queues | List queues in a cluster |
get_cluster_queue | Get queue stats (agent count, jobs waiting) |
User typically describes a symptom:
| Input | Likely Issue |
|---|---|
| "build stuck" | Job in scheduled state |
| "waiting for agent" | No matching agents |
| "job not starting" | Agent configuration mismatch |
| "queue problem" | Queue doesn't exist or no agents |
Get the build number/URL to investigate.
Get the build with buildkite_get_build
Check cluster/queue configuration
buildkite_list_clustersbuildkite_list_cluster_queuesbuildkite_get_cluster_queueCompare requirements vs availability
Provide diagnosis and fix
| State | Meaning | Indicates |
|---|---|---|
scheduled | Waiting for agent | No matching agent available |
assigned | Agent accepted | Agent has it but not starting |
accepted | Agent starting | Should run soon |
Jobs stuck in scheduled = agent matching problem.
Symptom: Job stuck in scheduled Cause: Job requires queue that doesn't exist or has no agents
# Pipeline requires:
agents:
queue: "deploy"
# But no agents are in the "deploy" queue
Diagnosis:
Job requires: queue=deploy
Available queues: default (5 agents), build (10 agents)
❌ No "deploy" queue exists
Fix: Add agents to the deploy queue, or change pipeline to use existing queue.
Symptom: Job stuck in scheduled Cause: Job requires tags no agent has
# Pipeline requires:
agents:
queue: "default"
docker: "true"
os: "linux"
# Agents have docker=true but os=macos
Diagnosis:
Job requires: queue=default, docker=true, os=linux
Available agents in default:
- agent-1: docker=true, os=macos
- agent-2: docker=true, os=macos
❌ No agent matches os=linux
Fix: Add Linux agents, or remove the os requirement.
Symptom: Job stuck in scheduled Cause: Queue exists but no agents connected
Diagnosis:
Job requires: queue=deploy
Queue "deploy" exists but has 0 connected agents
Fix: Start agents, check agent host health, verify network connectivity.
Symptom: Job stuck in scheduled longer than usual Cause: Agents exist but at capacity
Diagnosis:
Job requires: queue=default
Queue "default": 3 agents, 15 jobs waiting
Average wait time: 12 minutes
Fix: Scale up agents, reduce parallelism, or wait.
Symptom: Job stuck in assigned state Cause: Agent accepted job but can't start it
Possible causes:
Fix: Check agent logs on the host machine.
## Agent Issue Diagnosed
**Build**: #456
**Stuck Job**: "Run Tests"
**State**: scheduled (waiting for agent)
### Job Requirements
- Queue: `deploy`
- Tags: `docker=true`
### Available Resources
- Queue `deploy`: ❌ Does not exist
- Queue `default`: 5 agents (none match)
### Root Cause
The job requires `queue=deploy` but no such queue exists in your cluster.
### Fix
**Immediate**: Change the pipeline to use `queue=default`:
```yaml
agents:
queue: "default"
docker: "true"
```
**Long-term**: Create a `deploy` queue and add dedicated agents for deployments.
When explaining fixes, reference these Buildkite agent commands:
# Check agent status
buildkite-agent status
# See what queues/tags an agent has
buildkite-agent start --tags "queue=deploy,docker=true"
# Check agent logs
journalctl -u buildkite-agent
User: My build is stuck waiting for an agent
1. Ask for build URL/number
2. Fetch build, find stuck job in "scheduled" state
3. Extract agent requirements: queue=special, gpu=true
4. List queues - "special" exists with 2 agents
5. Check queue details - agents have gpu=false
6. Explain: "Job needs gpu=true but queue agents don't have GPU tag"
7. Suggest: Add GPU agents or modify job requirements