Shared environment
Worktrees don't isolate your database or ports
Git worktrees keep agents' files apart, but they still share the dev database, migrations, ports and other local services. Declare those as shared risks.
The problem
Each agent has its own worktree, then two of them run migrations against the same dev database, or both start a server on port 3000.
What people try
- A separate database and port range per worktree
- Good when you can afford it, but migrations and seed data still have to agree once the branches merge.
- Telling agents not to run migrations
- The work often needs one, and the agent either guesses or stops.
With Concord
01
Tag the resource
When claiming, an agent adds risk tags such as db-migrations or dev-port-3000 alongside its files.
02
Overlap on tags
Concord flags a shared risk tag the same way as a shared file. Linked worktrees use one workspace, so every lane sees it.
03
Sequence it
The agents agree an order over messages, or one hands the migration to the other, before the database is in two states.
Result
Worktrees handle the files. Claims and risk tags cover the database, ports and services they all still share.
Common questions
- Should I still give each worktree its own database?
- If you can, yes. Separate Compose project names and ports remove a lot of runtime clashes. Risk tags cover what can't be separated, like the migration sequence itself.
- Do tags have to match exactly?
- No. Tags are compared as normalised words, so db-migrations, DB migrations and db_migrations all match.
Further reading
Give your agents shared work-state.
npm install -g @concord-ai/concord-mcp