Skip to content
Latchkey

Azure Pipelines Self-Hosted Agent Offline - Job Stuck Queued

The job is waiting for a self-hosted agent that is offline. The agent service stopped, lost connectivity to Azure DevOps, or its registration token expired - so nothing picks the job up.

What this error means

The job stays in the queue indefinitely. In Project Settings → Agent pools the agent shows Offline (grey). Microsoft-hosted runs are unaffected; only the self-hosted pool is starved.

Azure DevOps
The job is waiting for an available agent in pool 'Default'.
Agent 'BUILD-AGENT-01' is offline.

Common causes

Agent service stopped or host rebooted

The agent runs as a service; if the host rebooted without the service set to auto-start, or the process was killed, the agent goes offline and stops polling.

Lost connectivity or expired credentials

A network outage between the agent and dev.azure.com, or an expired/ revoked PAT used at registration, drops the agent’s connection.

How to fix it

Restart the agent service

Bring the agent process back online on the host.

Agent host
# Linux (systemd)
sudo ./svc.sh status
sudo ./svc.sh start
# Windows: restart the "Azure Pipelines Agent" service

Re-check connectivity and re-register if needed

  1. Confirm the host can reach https://dev.azure.com over outbound 443.
  2. If the PAT expired, reconfigure the agent with a fresh token (./config.sh).
  3. Set the service to start on boot so a reboot does not leave it offline.

How to prevent it

  • Run agents as auto-start services and monitor their online status.
  • Use a long-lived registration method and rotate PATs before expiry.
  • Alert on agents going offline so queued jobs do not pile up.

Frequently asked questions

What causes "Agent offline"?
The agent runs as a service; if the host rebooted without the service set to auto-start, or the process was killed, the agent goes offline and stops polling.
How do I fix Agent offline?
Bring the agent process back online on the host.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card