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
b478dfdf5eBen Brandt committed on 3/24/2026, 11:52:35 AM· committed by GitHubparent45be23c
3 files changedLine totals unavailable