# How to make all agents work in the same path?

**URL:** <https://forum.buildkite.community/t/how-to-make-all-agents-work-in-the-same-path/4234>\
**Category:** General\
**Created:** [February 24, 2025, 4:16am UTC](https://forum.buildkite.community/t/how-to-make-all-agents-work-in-the-same-path/4234 "2025-02-24T04:16:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![louis](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@louis](https://forum.buildkite.community/u/louis)\
**Post date:** [February 24, 2025, 4:16am UTC](https://forum.buildkite.community/t/how-to-make-all-agents-work-in-the-same-path/4234/1 "2025-02-24T04:16:38Z")

</div>

I have a number of agents, all running in separated machines. I would like all of those agents to run the builds in the same path. So I have set `build-path=/home/user/builds` in the configuration, expecting builds to be in `/home/user/builds/PIPELINENAME`. But the builds actually happen in `/home/user/builds/XXX/PIPELINENAME`, with XXX being the name of the agent.

Is there a way to not have the agent name as part of the path? If it is not possible, what would be the implications of giving the same name to all of the agents?

Thanks for your help

---

<div class="post-metadata">

**Author:** ![benmc](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/benmc/32/1159_2.png) [@benmc](https://forum.buildkite.community/u/benmc)\
**Post date:** [February 24, 2025, 5:14am UTC](https://forum.buildkite.community/t/how-to-make-all-agents-work-in-the-same-path/4234/2 "2025-02-24T05:14:48Z")

</div>

Hey @Louis 👋

You’ll want to set the [BUILDKITE\_BUILD\_CHECKOUT\_PATH](https://buildkite.com/docs/pipelines/configure/environment-variables#BUILDKITE_BUILD_CHECKOUT_PATH) in your agent config, or in a hook, so that the path can be changed before the checkout occurs.

We tend to advise doing this in a hook, so that it’s easily managed/can be stored in VCS.

Cheers!
