Vibe Coding
Extend Git Worktrees with Per-Worktree Database Instances for True Agent Isolation
Claude Code's git worktree isolation stops at filesystem boundaries — multiple parallel agents still share the same database, causing state collisions in database-backed applications. Damian Galarza's March 10 technique extends the pattern by provisioning a fresh database instance per worktree at creation time via a PostWorktreeCreate hook or wrapper script, with Docker containers or SQLite file paths that mirror the worktree directory naming convention. This achieves genuine full-stack isolation: each agent gets its own branch, working directory, and database state.
↳ Follow the thread