Skip to content
Latchkey

Azure Pipelines "agent lost communication with the server"

The server stopped receiving heartbeats from the agent while a job was running and abandoned the job. The agent host rebooted, lost network, ran out of memory, or had its process killed.

What this error means

A running job fails with ##[error]The agent X lost communication with the server or We stopped hearing from agent X and the job is abandoned mid-step.

Azure DevOps
##[error]We stopped hearing from agent 'self-host-01'. Verify the agent machine is
running and has a healthy network connection.

Common causes

The agent host rebooted or lost network

A restart, a dropped connection, or a flaky link severs the heartbeat, so the server gives up on the job.

Resource exhaustion killed the agent

Out-of-memory or disk pressure on the host can kill the agent process, ending its communication abruptly.

How to fix it

Verify host health and connectivity

  1. Confirm the agent machine is running and the agent service is up.
  2. Check for reboots, OOM kills, or full disk around the failure time.
  3. Ensure stable outbound connectivity to dev.azure.com.
Terminal
sudo systemctl status vsts.agent.*.service
journalctl -u 'vsts.agent.*' --since '30 min ago'

Give the agent more headroom

Provision more memory and disk, or run fewer concurrent jobs per agent, so a heavy job does not exhaust the host.

How to prevent it

  • Monitor agent host memory, disk, and network.
  • Limit concurrent jobs per agent to avoid resource exhaustion.
  • Run the agent as a service so it restarts after a reboot.

Frequently asked questions

What causes ""lost communication with the server""?
A restart, a dropped connection, or a flaky link severs the heartbeat, so the server gives up on the job.
How do I fix "lost communication with the server"?
Verify host health and connectivity

Related guides

References

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