Forum Discussion
WouterV2
Dec 13, 2023Copper Contributor
Azure pipelines self-hosted agent retention
A client has a need to rerun certain deployment stages of an azure pipeline. The pipeline is ran on a self-hosted agent (because we need some installed CLI on that machine to build the app). The prob...
Kidd_Ip
Jun 01, 2025MVP
Normally, agents should allocate unique workspace folders (c:/agent/_work/1, c:/agent/_work/2, etc.), ensuring independent execution environments. Please take a look at the following:
- Check and reconfigure the agent:
./config.cmd --work c:/agent/_work
2. Force clean workspace before each run:
pool:
name: 'Self-Hosted'
demands: agent.os -equals Windows
steps:
- checkout: self
clean: true
3. Check and try manual delete Mapping.json, restart the agent and force a refresh
4. Check Auto cleanup policy:
./config.cmd --work c:/agent/_work --runAsService