Skip to content
NO FEED

Understand the changes. Choose the tools. Put AI to work.

← ArticlesPublished · 5 min read · Updated

Give each agent its own application state.

One developer’s worktrees stopped file conflicts but left browser tests reaching shared services. Separate the database and runtime each task actually uses, then test cleanup.

The argument

Parallel coding agents need their own mutable application state and a named cleanup owner, because a Git worktree alone cannot protect another task’s database or unfinished work.

01Worktrees fixed the checkout, not the test environment

Reddit user Jhon_ST described working across roughly five Trello cards at once, with a branch and Git worktree per coding task. In their 27 September account, this stopped agents editing the same checkout. Browser QA still needed to establish which API, PostgreSQL database and worker it reached. The team added a service registry with process IDs, ports, URLs and declared database state, and kept integration serialized. That is an attributed workflow report, without a controlled speedup measurement. 8

To see the failure it is meant to prevent, consider hypothetical billing and signup agents. Their files live in separate worktrees, but their applications open the same local database. A billing migration test resets it while signup is reading a fixture. The patch may be correct and the reset intentional; the other task still loses its test data. This example is not an incident reported by Jhon_ST.

Supabase’s 14 October announcement describes an experimental local engine with a separate project for each worktree, requiring CLI 2.119.0 or later. Each project can reset, migrate and test its own database. This addresses the example’s shared-data problem; issue #53 kept the verdict at WAIT pending evaluation in the team’s own setup. 1

Hypothetical billing and signup agents in separate Git worktrees. With one shared test database, a billing reset can invalidate signup fixtures; with a database per task, signup fixtures remain separate.
Two layouts for the hypothetical billing/signup tasks. Worktrees separate code; a database per task gives each agent its own reset target. The runtime still determines how services share the host.Illustration: NO FEEDSources: Supabase — local project per agent, 14 October 2026 read · Supabase — multiple local projects, current guide read 19 October 2026 read · Supabase — Docker and native runtimes, current guide read 19 October 2026 read

02Check the endpoint the test actually reaches

Git’s worktree manual describes separate working directories, HEAD and index, while the repository remains shared. Repository configuration is also shared by default unless worktree-specific configuration is enabled. Those arrangements say where the source lives; the application’s database connection needs its own identity. 2

For billing and signup, compare the database each running process opens with its local project's reported endpoints. Supabase's endpoint guide shows supabase status, with --stack <name> for a named project. Two different environment files can still contain the same endpoint. 3

Supabase derives its local-project identity from the project root, Git branch and optional stack name. Different identities get separate local services and data; agents sharing one checkout and branch still share a local project. Its guide also warns about fixed-port collisions. Include the resolved endpoint in the task’s resource record, without copying credentials. 3

Jhon_ST’s registry addresses discovery: which worktree started which process? It does not establish API compatibility. A healthy service running an older branch can return valid responses that never exercise the new behavior. Before accepting a browser test, compare the expected revision and database identity with the service it reached, then repeat relevant checks on the combined tree. This follows the distinction the author makes between parallel feature work and serialized integration. 8

From the source
A healthy endpoint can still be the wrong API, and a port that looks free has not been reserved.
u/Jhon_ST · r/ChatGPTCoding27 September 2026. A limitation of the service registry described in the author’s parallel-agent workflow.Source: Jhon_ST — parallel worktrees and runtime tracking, Reddit, 27 September 2026 read
ResourceRecordCheck before acceptance
SourceCommit and worktree pathThe tested revision is the proposed revision
Mutable dataDatabase or local-project identityThe task changed only its assigned data
ServicesResolved endpoints and runtimeThe application connected to the intended instance
CleanupResource owner and retained outputsUnaccepted work survives cancellation
A proposed resource record for a parallel task; these are identifiers to verify, not credentials to print.

03Choose where the services run

Supabase recommends Docker or Podman for several local projects on one machine, giving them separate network namespaces and file systems. Its native runtime runs services as host processes, sharing the host process table and file locks. That mode is intended for one project per environment when a container engine is unavailable. The runtime choice is recorded when the project is created. 4

The billing and signup example therefore needs a machine as well as two branches. Both agents on one laptop and one agent in each disposable runner are different arrangements. Choose the runtime for the arrangement you will operate. A separate database also leaves a separate question: what else can either agent reach on that host?

The same thread includes a concrete alternative. On 28 September, commenter Something_Sexy said their team runs separate containers per worktree and has not found the resource requirement problematic so far, while noting that larger platforms may need a stronger machine. Their report offers an implementation choice, not a memory budget or evidence that containers alone fix database targeting. It reinforces the tradeoff: isolation has a host-resource cost that must fit the actual stack. 9

04Cancellation does not finish cleanup

Claude Code 2.1.301 fixes quitting that could remove a WorktreeCreate-hook worktree without asking, even when it might contain unpushed commits. Orca 1.4.227 addresses deletion of a folder that Git no longer tracks. These are vendor-reported fixes, not a record of failures in our hypothetical application. 6 7

Now cancel the billing agent halfway through its task. Its diff, migration output and database may still matter to the person reviewing the work. Name the person or process allowed to remove each resource, and preserve unaccepted work before cleanup. The signup agent should continue against its own data while billing waits for review.

The database has its own lifecycle. Supabase distinguishes stopping a local project, which keeps its data and ports, from destroying one, which deletes its data. Docker also documents that a volume can survive removal of its container. Stopping billing therefore does not establish that its data is gone. A later cleanup job needs the current resource identity, rather than a remembered path or a port that another task may now use. 3 5

05Try the collision before counting the speedup

A small trial can start with disposable billing and signup fixtures. Have signup repeatedly read its fixture through the real application launcher while billing resets its own database. Signup’s fixture should survive. Reverse the roles, then repeat after a resumed session and a cancellation. This is a proposed test; we have not run it here.

If signup loses its data, inspect the connection that process opened. A reused environment file, matching project identities or a fixed port may explain the collision. The result is actionable because it identifies the configuration that failed, rather than treating the agent’s completion message as proof that the tasks stayed apart.

Only then compare completed work. Run the same acceptance tasks serially and in parallel, including service startup, retries, review and cleanup in the time and cost. These releases do not tell us whether parallel agents will finish your work sooner. If preparing separate environments costs more than the interference it avoids, shared access with explicit coordination may suit that workload better.

→So what

  • Start with one workflow where two agents share writable data. Give each task a resource record and a cleanup owner.
  • Try reset, resume and cancellation with disposable fixtures through the actual launcher.
  • Keep the runtime and CLI versions with the result. Compare accepted work, including setup and recovery, against a serial run.

?What would change our mind

  • A repeatable comparison showing that shared data survives the same resets, resumes and cancellations without extra recovery work would weaken the case for separate instances on that workload.
  • An orchestrator that enforces task ownership across source, services and cleanup, with independent evidence of those checks, would remove some of the manual work proposed here.
  • If environment startup and maintenance outweigh the avoided interference, we would change the recommendation for that workload and publish the task set, failures and measurement method.
Sources, with the date each was read
  1. 1Supabase — local project per agent, 14 October 2026read 2026-10-19
  2. 2Git worktree manual — current documentation, version history includes 2.56.0read 2026-10-19
  3. 3Supabase — multiple local projects, current guide read 19 October 2026read 2026-10-19
  4. 4Supabase — Docker and native runtimes, current guide read 19 October 2026read 2026-10-19
  5. 5Docker — volume lifecycle, current documentationread 2026-10-19
  6. 6Claude Code 2.1.301 — published 15 October 2026read 2026-10-19
  7. 7Orca 1.4.227 — published 16 October 2026read 2026-10-19
  8. 8Jhon_ST — parallel worktrees and runtime tracking, Reddit, 27 September 2026read 2026-10-19
  9. 9Something_Sexy — per-worktree containers, Reddit comment, 28 September 2026read 2026-10-19

The useful part, in your inbox.

One complete edition every weekday, with practical takeaways.