Azure Pipelines: "No agent found in pool ... which satisfies the specified demands": the missing capability, an old agent, or a pool with no agents
The job names a pool and a list of demands, and no agent in that pool has a capability for every one of them. Read the list after the colon: usually one entry is the answer, a tool the agent did not detect (maven, npm, java, msbuild) or Agent.Version -gtVersion with a version newer than the agent. Install the tool and restart the agent, or update the agent (the most viewed Stack Overflow question on this message has been seen more than 36,000 times).
When this fails a pull request's build validation, the pull request cannot complete until a run passes: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists that pull request's branch policies with their state in your IDE, and when a required one has not passed, its Complete dialog offers auto-complete first. Get it on JetBrains Marketplace
What it looks like
##[error]No agent found in pool Default which satisfies the specified demands: maven, Agent.Version -gtVersion 3.243.1. The pool's name comes first, then every demand of the job, separated by commas.- Older runs wrote the list with spaces instead of commas (
msbuild visualstudio vstest Agent.Version -gtVersion 2.103.0), and TFS 2015 saidNo agent could be found with the following capabilities.
Reading the demands
- A demand is met when an agent has a capability with that name (exists), or with that name and value (
-equals); the comparison is not case sensitive. These are the only two checks you can write in a pipeline (pool.demands, Microsoft). - Tasks add demands of their own: the Visual Studio Build task, for example, demands
msbuildandvisualstudio. So a demand you never wrote can come from a task in the job. Agent.Version -gtVersion 3.243.1is one you did not write either: it asks for an agent newer than that version, because a task in the job needs it. Microsoft says an agent upgrade is requested when a task in the pipeline, or a platform feature, needs a newer agent (Agent version and upgrades).- To see what an agent has: Project settings (or Organization settings) → Agent pools → the pool → Agents → the agent → Capabilities. System capabilities are what the agent found; user capabilities are the ones you added.
Agent.Versionis there too.
A tool the agent did not detect (maven, npm, java, msbuild)
- The agent scans for tools when it starts and registers what it finds, so a tool installed while the agent was running is not a capability until the agent restarts (Microsoft says the same for self-hosted agents).
- On Linux and macOS, the agent service keeps a snapshot of environment variables such as PATH and JAVA_HOME from when it was configured. After installing software, run
./env.shin the agent's folder, then restart the service (sudo ./svc.sh stop,sudo ./svc.sh start); the snapshot is in the.envand.pathfiles there (Linux agent, Update environment variables). - Names matter: Windows agents register
maven,npm,java,jdk,MSBuild,VisualStudio,SqlPackageand versioned names such asjava_17andjdk_17(the agent's own capability scripts). A tool that is there under another name or path is not found. - If the tool is installed but the agent still does not list it, add it on the agent's Capabilities tab as a user capability (for example
mavenwith its path), which the accepted answer on a maven case did.
An agent older than the job needs (Agent.Version -gtVersion)
- Compare the version in the message with the agent's
Agent.Versioncapability. - When only the minor version differs, Azure Pipelines can update a self-hosted agent by itself (on by default; the setting is under Agent pools, Settings). An agent you run interactively, or a newer major version, needs a manual update: Agent pools → the pool → Update all agents, or Update agent on one agent. The update runs when the agent's current job finishes and downloads about 200 MB.
- On Azure DevOps Server, the agent offered as an update is the one that came with the server. From Azure DevOps Server 2019, download a newer agent from the Azure Pipelines Agent releases on GitHub and put it in
%ProgramData%\Microsoft\Azure DevOps\Agentson each application tier (create the folder if needed); the server then offers it as the update, also without internet access. - An answer from a TFS 2015 to TFS 2017 upgrade: the old agent had to be removed and the new one downloaded from the server.
A pool with no agent for this job
- The Default pool is where self-hosted agents are registered (Agent pools). If nobody registered one, a job on
pool: Defaultfinds no agent. To run on Microsoft's machines instead, name an image:vmImage: ubuntu-latestunderpool:. If that fails with "No hosted parallelism has been purchased or granted", see that page. - On Microsoft-hosted agents you choose the image rather than write demands, and they do not display system capabilities: Microsoft lists their software per image instead.
- In a classic pipeline, the agent job can name its own pool instead of the pipeline's (an answer on Stack Overflow found the pool set in both places). The message names the pool the job used; check it is the one you meant.
- Several operating systems in one pool: a job that needs Linux can demand
Agent.OS -equals Linux, and fails the same way when no Linux agent is in the pool.
Azure DevOps pull requests in IntelliJ IDEA and Rider
Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and when a required policy has not passed, its Complete dialog offers auto-complete first. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.
Get it on JetBrains Marketplace
Azure DevOps and Azure Pipelines are trademarks of Microsoft Corporation; GitHub is a trademark of GitHub, Inc.; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft, GitHub, Inc. or JetBrains.
More: an agent that stopped answering during the job · no Microsoft-hosted parallel job yet · a run that waits for Permit · Node.js 6, 10 and 16 leave the agent on November 24, 2026 · 日本語