← Back to news
Supabase: A Database per Agent, Human Control over Migrations

Photo: Florian Hirzinger / Wikimedia Commons — CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/). Source photograph unmodified; display resizing/format conversion possible.

19/10/2026

Supabase: A Database per Agent, Human Control over Migrations

Give every coding agent a database, not the production keys

When two coding agents work on the same application, separate Git branches are not enough. One agent can reset the database while another is testing signup. A schema migration can invalidate a colleague's fixtures. A successful test can depend on state left behind by somebody else. The missing boundary is often not the code repository: it is the mutable environment behind it. Humans should decide which state an agent may change, and under what conditions its changes can reach users.

Supabase's October 14 announcement makes that boundary more practical. Its CLI now supports multiple local projects, one per Git worktree, and a native runtime that does not require Docker. These capabilities ship in CLI v2.119.0 behind an experimental flag. This is useful infrastructure for AI-assisted development, not evidence that database governance can be delegated. The opportunity is to give agents disposable environments while keeping migration approval and production authority with accountable people.

What Supabase actually announced

According to the vendor, each worktree can have its own Postgres, Storage, Edge Functions, and MCP server. The CLI chooses ports and remembers them across restarts. An agent should read the project's connection information from structured CLI output rather than assume familiar default ports. That small operational detail matters: a correctly written migration sent to the wrong database remains a serious failure.

The announcement also describes services that start on demand and a native runtime for supported Linux and Apple silicon macOS environments. Supabase recommends Docker or Podman for several projects on one laptop, because containers give each project its own network and filesystem. It presents native execution as a good fit for one project per sandbox. A process running locally is not automatically a security sandbox, and a separate database is not a complete isolation strategy.

Supabase reports lower startup times and memory consumption in its measurements. These are vendor benchmarks, not independent productivity findings. The more important engineering consequence is that creating a dedicated test environment becomes cheaper. Teams can spend that saving on repeatable verification instead of treating a shared development database as a scarce resource that everyone must modify carefully.

Isolation changes the shape of delegation

Consider an illustrative task: one agent adds a billing field while another changes account registration. With a shared database, both agents can appear successful separately and still interfere with one another. A reset destroys the other's setup; a schema change makes its test results difficult to interpret. Worktree-specific projects remove that particular collision by giving each task its own disposable state.

This does not prove the combined application works. Two independently passing branches can introduce conflicting migrations, incompatible assumptions, or different interpretations of the same customer record. Isolation gives cleaner evidence about an individual change. Integration testing must still establish whether the changes coexist. A human technical owner should decide the order of integration when the underlying business concepts overlap.

The useful delegation contract is therefore specific: implement this bounded change, in this identified environment, with these fixtures and acceptance criteria. The agent may reset its own disposable project. It may not reinterpret a reset failure as permission to switch to a shared or production connection. Environment selection belongs in enforceable configuration and credentials, not only in a sentence telling the model to be careful.

Separate identity from convenient connectivity

A worktree directory is an organizational boundary, not an authorization system. An agent that can read a developer's shell environment may still discover unrelated database credentials. An agent with unrestricted network access may still connect elsewhere. Separate projects reduce accidental state collisions, but permissions and runtime restrictions must prevent escalation beyond the assigned project.

Use credentials scoped to the task, keep production secrets out of the agent's environment, and restrict available tools and destinations where the platform permits it. Record the intended project identifier alongside the worktree and task. Before destructive operations, verify the actual target through a trusted check rather than asking the agent to infer it from a directory name.

Supabase's MCP documentation exposes options for scoping a connection to a project, limiting it to read-only access, and enabling selected tool groups. These controls are useful when supported by the chosen setup. They do not replace a review of effective privileges. A team should distinguish an agent that can inspect schema from one that can execute SQL, apply migrations, or access sensitive rows.

Test the migration path, not only the final schema

Database changes differ from ordinary source changes because existing state matters. A fresh database can accept a new constraint that fails against historical records. A column rename can satisfy the new application while breaking an older instance still serving traffic. Resetting a local project is valuable for reproducibility, but it can hide precisely the upgrade conditions that make production risky.

Run two complementary checks. First, build a clean database from the committed migration history and fixtures. Second, apply the proposed migration to a representative prior schema with controlled, non-sensitive historical cases. Include null values, duplicate values, unusual identifiers, and records created by earlier application versions when those cases are relevant. The human reviewer should approve the assumptions behind this dataset.

For changes that affect access control, test different identities explicitly. Verify that an authorized user can perform the intended operation and an unauthorized user cannot. A passing administrator query says little about tenant isolation. Agents can draft and execute these tests, but a person responsible for the product must define which users should see or modify which records.

A preview branch is evidence, not permission

Supabase's October 15 engineering explanation describes how preview branches receive settings, migrations, and functions. GitHub-connected branches take repository inputs such as configuration, migrations, seed files, and functions. Gitless branches derive their schema and functions from the main project. These are materially different paths. Reviewers need to know which path produced the environment they are assessing.

The post explains that repository configuration can override copied settings, and that migration files run as individual transactions in the described workflow. This is helpful behavior, but it is not a universal rollback guarantee. A committed destructive change can still remove valuable data. Application behavior, external calls, and later deployments may create consequences outside a single database transaction.

A preview URL should therefore travel with an evidence bundle: commit identifier, environment identity, migration list, test results, relevant configuration differences, and unresolved limitations. Review the exact revision that will be promoted. If an agent modifies the migration after approval, the earlier evidence no longer describes the candidate. Required checks and approval rules must bind to the updated change.

Keep realistic data from becoming a new leak

Teams often want production-like data because empty databases miss important failures. That does not justify copying customer records into every agent's workspace. Local environments may expose data through logs, prompts, debugging output, or connected tools. A disposable database can still contain information that must not leave an approved boundary.

Prefer synthetic fixtures that preserve the relationships and edge cases needed for the task. Where sanitized samples are necessary, define the sanitization process and verify its output before granting access. Remove secrets, direct identifiers, and sensitive free-text fields according to the organization's policy. Preserve only the properties required to test the migration, rather than treating realism as an unlimited objective.

Also inspect outbound side effects. A copied function or webhook configuration can be harmless in structure but dangerous if it calls a real payment, messaging, or analytics service. Use test endpoints and test identities. Humans should approve which integrations are active in previews; an isolated Postgres instance does not automatically make the whole application safe to exercise.

A reviewable workflow for parallel agents

The following is a proposed team workflow, not a report of a deployment tested for this article. Start with one existing service and a low-risk schema change. Keep the current release process intact while evaluating whether isolated projects make the evidence clearer and reduce interference between tasks.

  1. Assign a task owner. Define the intended behavior, allowed schema changes, access rules, and conditions requiring escalation before the agent starts.
  2. Create the dedicated worktree and project. Record their identifiers and provide only the credentials and tools needed for this task.
  3. Prepare controlled fixtures. Cover the relevant upgrade cases and access-control boundaries without importing unnecessary sensitive data.
  4. Require reproducible verification. Check clean creation, upgrade behavior, application compatibility, and relevant negative authorization cases.
  5. Integrate deliberately. Re-run checks with other accepted changes and inspect migration order before opening the production gate.
  6. Approve and observe release. A named person accepts the deployment plan, recovery approach, monitoring, and stop conditions.

Do not let the agent approve its own exception when a check fails. Return structured diagnostic information so it can propose a correction, but reserve changes to the governing rule for an authorized human. Otherwise a productive repair loop can quietly become a process for weakening the acceptance criteria until everything turns green.

Recovery is a separate engineering decision

For a database migration, reverting a Git commit is not a recovery plan. Some operations are reversible without losing data; others are not. Even a technically available backup restore may imply downtime or losing writes made after the recovery point. The person approving release must understand those trade-offs before deployment, rather than discover them during an incident.

For higher-risk changes, consider an expand-and-contract sequence: add the compatible structure, migrate application behavior and data in controlled stages, verify the outcome, and remove the old structure later. This is a design option, not a universal recipe. Lock behavior, table size, deployment topology, and compatibility requirements determine the appropriate approach.

The agent can help enumerate dependencies, draft a runbook, and identify assumptions in the plan. A database specialist or service owner should assess operational consequences and confirm whether the proposed checks represent the real workload. Independent judgment is particularly important where local datasets are much smaller than production or lack concurrent traffic.

Measure useful independence, not agent activity

A pilot should track whether tasks stop interfering with each other, whether reviewers can reproduce failures, and how often integration reveals assumptions missed locally. Track environment cleanup and resource usage as well. More parallel projects are not automatically better if abandoned instances, stale migrations, or ambiguous ownership make the system harder to operate.

The experimental status of the new local engine also matters. Supabase explicitly warns that flags and output may change and recommends reviewing its limitations before moving a workflow over. Pin the toolchain used by a pilot, document the fallback, and avoid making an experimental convenience a hidden dependency of the production release process.

The practical lesson is straightforward: give agents more freedom inside environments where errors are contained, and make the path out of those environments more explicit. A database per agent can improve the quality of experimentation. It cannot decide whether a migration preserves customer trust. AI should help implement and verify the change; humans must remain in command of its consequences.

Sources and illustration

Primary sources: Supabase local projects per agent, October 14; Supabase branch workflow, October 15; Supabase MCP documentation. Product descriptions and performance claims are attributed to Supabase; the governance workflow above is our analysis.

Selected illustration: a CERN server room, photographed in 2009, not a Supabase installation. Photo: Florian Hirzinger / Wikimedia Commons, CC BY-SA 3.0. The source photograph is unmodified; display resizing or format conversion may be applied by the website.