Azure Pipelines Self-Hosted Capabilities Do Not Match Demands
A self-hosted job declares demands that no agent in the pool advertises as a capability. With value demands the capability must exist and match the compared value, or the scheduler finds no eligible agent.
What this error means
The job never starts and reports that no agent's capabilities satisfy the demands, listing the unmet capability or value comparison. Unlike a busy pool, no agent is even eligible.
##[error]No agent found in pool 'Self-Hosted' whose capabilities match
the demands: docker, JAVA_HOME -equals /opt/jdk17Common causes
Capability absent on every agent
An exists-only demand (docker) needs at least one agent advertising that capability. If no agent has Docker installed/detected, the demand is unmet.
Value demand does not match
A -equals/-gtVersion demand needs an agent whose capability has that exact value. A different JAVA_HOME value, or a missing user capability, fails the match.
How to fix it
Demand only capabilities an agent advertises
List existing capabilities and use value comparisons that an agent meets.
pool:
name: Self-Hosted
demands:
- docker # exists-only
- Agent.OS -equals LinuxAdd the missing capability to an agent
- In Agent pools → the agent → Capabilities, add the user capability with the required value.
- Install the tool so the system capability auto-detects after an agent restart.
- Keep tool versions consistent across the pool so value demands hold.
How to prevent it
- Keep demands minimal and value comparisons rare.
- Standardize installed tools and versions across the pool.
- Document each agent's user capabilities.