A Git worktree keeps one coding agent’s files separate from another’s. It does not stop those agents from applying incompatible migrations to the same development database. Databricks’ new Lakebase implementation guide addresses that problem by giving each agent an isolated database branch, then creating a separate temporary branch when its work reaches a pull request.
The October 8 guide connects Git worktrees, a post-checkout hook, Claude Code, Lakebase and GitHub Actions into an end-to-end development workflow. It follows the change through migrations, tests, a preview application, a schema-diff comment and eventual database-branch deletion.
Databricks had already described Lakebase branching in its database-development guidance. This guide introduces no new branching feature; it connects agent-local experimentation to a reviewable CI process.
Database branches remain disposable test environments. They are not merged into production like Git branches. The code and migration files carry the change forward.
A Worktree Separates Code; a Lakebase Branch Separates State
The local workflow begins with an agent starting Claude Code in a named Git worktree. Each worktree provides a separate directory with its own checked-out branch, allowing agents to edit different features without competing over the same files. A Git post-checkout hook then creates a corresponding Lakebase database branch, so setting up the agent’s code environment also provisions its database environment.
An agent may add a column, modify an index, insert test records or run a migration. Separate directories offer no protection if every session still points at one shared database.
Databricks says Lakebase’s copy-on-write architecture creates branches in under a second, regardless of database size. That is a vendor performance claim, not an independently measured result presented with the guide. The underlying mechanism is documented: a child initially shares its parent’s storage, with changed data written separately.
According to the Lakebase branch documentation, a branch inherits schema and data, but subsequent changes are independent. Child changes do not affect the parent, and parent changes do not automatically appear in children. Isolation also extends to Postgres roles, databases and permission changes.
Teams need to check that the agent’s application, migration tool and tests actually use its assigned branch. Provisioning an isolated database achieves little if a process retains a shared development connection string. Branch-specific connection configuration should be part of worktree setup.






