# acp: Fix the spawn directory for agent servers in remote environments \(\#52308\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/b478dfdf5e21a3bb5ae532d13c93b61694fdbe8f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: b478dfdf5e21a3bb5ae532d13c93b61694fdbe8f

Requested commit: b478dfdf5e21a3bb5ae532d13c93b61694fdbe8f

Commit: b478dfdf5e21a3bb5ae532d13c93b61694fdbe8f

Tree: 1023352a212d7ef8d5d06ff2548297f79280da1f

Author: Ben Brandt

Committer: GitHub

## Message

```
acp: Fix the spawn directory for agent servers in remote environments (#52308)

We can't add a current_dir when in remote scenarios in the same place,
it gets added elsewhere.

Reused the same worktree selection logic, and make sure this gets passed
to the RPC call instead.

This fixes something that hasn't made it to preview yet.

Release Notes:

- N/A
```

## Parents

- [45be23c56c2bfac6573920be7ad5a21943ec09c4](https://git.cafe/gitcafe/zed/commit/45be23c56c2bfac6573920be7ad5a21943ec09c4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/b478dfdf5e21a3bb5ae532d13c93b61694fdbe8f?format=markdown)
