---
title: "Comment by Mihai_LeanZero on \"One Agent, One Worktree: Isolation and Concurrency for Coding Agents\" | Hashnode"
description: "The isolation model here holds cleanly for anything that lives inside the repo, branch, worktree, ports, containers, db names. Where it gets harder is a task wh"
url: "https://hashnode.com/posts/parallel-coding-agents-isolation/6ab4dc91cfcc71d3b3162208/comment/6ab4f2eb16a155b5285167c8"
---

[Discussion](https://hashnode.com/posts/parallel-coding-agents-isolation/6ab4dc91cfcc71d3b3162208)

Comment [One Agent, One Worktree: Isolation and Concurrency for Coding Agents](https://hashnode.com/posts/parallel-coding-agents-isolation/6ab4dc91cfcc71d3b3162208)

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Sep 24](https://hashnode.com/posts/parallel-coding-agents-isolation/6ab4dc91cfcc71d3b3162208/comment/6ab4f2eb16a155b5285167c8)

The isolation model here holds cleanly for anything that lives inside the repo, branch, worktree, ports, containers, db names. Where it gets harder is a task whose side effect leaves the repo entirely: it called a third-party API, posted something, fired a webhook. You can namespace a database per task, but you can't namespace a request that already landed on someone else's server. By the time a branch reaches the merge queue, verification decides whether the code merges, but for that kind of task the risky part already happened before merge, independent of what merge decides. I've ended up treating any task with a real external effect as needing its own pre-flight or dry-run gate before it's allowed to run for real at all, separate from the isolation and merge machinery, rather than trying to stretch that machinery to cover it.

[Alen Joy](https://hashnode.com/@alenj)

[Sep 24](https://hashnode.com/posts/parallel-coding-agents-isolation/6ab4dc91cfcc71d3b3162208/comment/6ab4f2eb16a155b5285167c8#reply-6ab502db99c442ff2b7009f6)

Fair point, and it's a gap in the post. The merge gate is the wrong place for this because by then the request has already gone out.

For coding agents, my starting position is that the task environment shouldn't hold credentials that can do anything real. Sandbox keys, test mode accounts, and outbound traffic blocked unless it's on an allowlist. If a coding task can only prove it works by hitting a live third party, I'd treat that as a problem with the test setup rather than something to allow.

But some tasks genuinely need the real effect, and for those I agree a separate approval or dry run step before execution makes more sense than stretching the merge machinery. I'd add idempotency keys as well, so a retried run doesn't send the same thing twice.

Probably deserves a post of its own.

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Sep 25](https://hashnode.com/posts/parallel-coding-agents-isolation/6ab4dc91cfcc71d3b3162208/comment/6ab4f2eb16a155b5285167c8#reply-6ab60bfeb6f71623dc3c1664)

Agree the credential scoping is the stronger default. Where I'd still push back a little: sandbox keys and test mode accounts can drift from what the live endpoint actually does, so at some point something has to verify against the real thing. I'd keep that narrow and explicitly approved rather than something any task reaches on its own, closer to a manual gate than a test mode. Idempotency keys on top close most of what's left. Sounds like a real post.
