Fix: Failed to download agent from vstsagentpackage.azureedge.net in GitHub Codespaces or Self‑Hosted Azure Pipelines

-

Fix: Failed to download agent from vstsagentpackage.azureedge.net in GitHub Codespaces or Self‑Hosted Azure Pipelines

Summary

Users following Microsoft’s GitHub Codespaces tutorial sometimes see errors like “failed to download agent from vstsagentpackage.azureedge.net.” The pipeline tries to fetch an agent package from vstsagentpackage.azureedge.net, but the download fails and the build stops. This happens because Microsoft has retired the old CDN domain. Updating your scripts and firewall rules fixes the issue.

Why the download fails

Azure DevOps agents used to be distributed from the Edgio CDN at https://vstsagentpackage.azureedge.net. Microsoft announced that it is retiring the Edgio CDN and moving agent downloads to Akamai/Azure Front Door. As of June 11 2025 the old domain is inactive; downloading agents from that URL will fail. To ensure your self‑hosted or Codespaces agents continue to work, you must allow the new domain and update your scripts.

How to fix it

  1. Update your download script: Modify the curl command in your Dockerfile or bash script to use the new domain. For example: # OLD (no longer works) curl -O https://vstsagentpackage.azureedge.net/agent/4.252.0/vsts-agent-linux-x64-4.252.0.tar.gz # NEW (as of 2025) curl -O https://download.agent.dev.azure.com/agent/4.252.0/vsts-agent-linux-x64-4.252.0.tar.gz Replace 4.252.0 and x64 with the version and architecture you need.
  2. Add the new domain to your firewall allow‑list: Microsoft recommends opening https://download.agent.dev.azure.com and https://*.dev.azure.com in your organization’s firewall. Do not remove the old domain from your allow‑list yet.
  3. Test connectivity: Before running production pipelines, verify that your network can reach the new CDN. Microsoft provides a test job (PowerShell) that does a HEAD request to the new URL and prints the HTTP status. If you get a status code <400, the download site is reachable.
  4. Check pipeline scripts: Registration scripts generated before the CDN cut‑over may still point to the old URL. Regenerate scripts or manually update the download link to prevent future failures.

Conclusion

The “failed to download agent” error is due to a CDN switch. Update your scripts to use https://download.agent.dev.azure.com, add the domain to your firewall allow‑list, and test connectivity. These steps ensure your GitHub Codespaces or self‑hosted Azure Pipelines agents work smoothly.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent comments