FormingConfigclaude-codecodexcursorpublished fresh until

Give each agent worktree its own local Supabase database, with or without Docker

Summary The Supabase CLI (v2.119.0 and later, MIT) has an experimental stack runtime: each git worktree gets its own local Postgres, Auth, Storage and MCP endpoint on CLI-assigned ports, and it can run as native processes without Docker on Apple-silicon Macs and Linux. Parallel agents stop sharing one database and clobbering each other's migrations.

Not for cross-tenant RLS tests or one shared test DB file lock

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
AConfig · v2.121.0+wwfix.1Supabase CLI 2.121.0 with the experimental stack flag
How you use itA setting in your project
What it can doinstalls software · writes files · network · secrets access · runs shell
What's inside
AConfig · v2.121.0+wwfix.1Supabase CLI 2.121.0 with the experimental stack flag
How you use it
A setting in your project
What it can do
installs software · writes files · network · secrets access · runs shell
What's inside

What this thread does

As of November 2026, use one experimental Supabase stack per worktree; choose Docker or Podman for several projects on one laptop. Do first: enable [experimental] stack = true and remove fixed ports, following the setup guide. Read the v3 upgrade caveats below before updating scripts.

What changed

Supabase announced on 2 Oct 2026 that local development got better for agents, and explained it in a blog post on 14 Oct. The parts that matter for parallel agents:

  • One local stack per worktree. With the experimental stack flag on, supabase start in each git worktree creates a separate stack (Postgres, Auth, REST, Storage, Edge Functions, Studio and an MCP endpoint) on ports the CLI assigns, so two agents can run migrations and tests at the same time.
  • No Docker needed. supabase start --runtime native runs the services as plain processes. Without a flag, the CLI uses Docker if it answers, then Podman, then native where supported.
  • Connection details for agents. supabase stack status --env prints the URLs and keys for this worktree's stack, so an agent reads them instead of assuming port 54321.
  • Declarative schemas. The agent edits schema files and the CLI generates the migration.

How to turn it on

  • New project: SUPABASE_EXPERIMENTAL_STACK=1 supabase init writes the flag and leaves out the fixed default ports.
  • Existing project: add stack = true under [experimental] in supabase/config.toml, and remove fixed ports you set there, or every worktree will ask for the same port.

Then per worktree: git worktree add ../app-billing -b billing, cd ../app-billing, supabase start.

When to use it

You run several coding agents in worktrees of one Supabase app and they keep fighting over one local database. For a single agent, the default setup is fine.

Alternatives

  • Supabase branching (remote preview branches) when you want a hosted copy per PR.
  • Neon branches or a Postgres container per worktree via Docker Compose with per-worktree ports.
  • A cloud machine per agent (Amp orbs, Claude Code cloud sessions, Cursor cloud agents), which avoids sharing anything locally.

Caveats (as of October 2026)

  • The stack runtime and supabase stack commands are experimental and outside the CLI's compatibility promise; commands may change.
  • Native runtime: Linux (x64/arm64, glibc 2.35+) and macOS 14+ on Apple silicon only.
  • Each stack uses memory; Supabase quotes about 290 MiB idle per project in its post, so many parallel stacks still add up.
  • supabase stack destroy permanently deletes a stack's data.
  • The MIT licence file sits in the repo's Go CLI folder; the npm package is also labelled MIT.

CLI v3 upgrade caveats (2 November 2026)

Supabase CLI v3.0.0 retains the experimental stack. The v2-to-v3 guide changes defaults around it:

  • Local-capable database, migration, inspection, type-generation and storage commands now default to the local stack. SUPABASE_PROJECT_ID alone no longer selects a hosted target; use an explicit --remote target for hosted work. Old --linked, --project-ref, --db-url and type-generation --project-id aliases warn and are hidden from help; --local is a warning-only no-op.
  • Hosted mutations require confirmation and unattended mutations require --yes or a shell-exported SUPABASE_YES=1 (only if no project env file defines SUPABASE_YES); piping y or relying on SUPABASE_YES in a project env file no longer confirms them. Review the target before authorizing a hosted change. JSON object results and JSON error envelopes now include a target field; arrays and generated artifacts such as gen types output are unchanged.
  • Precedence is flags, shell environment, project env files, config, defaults. Audit SUPABASE_* values before config push. Stop the old stack before upgrading if project_id is absent, because local container/volume naming changes.
  • Removed legacy commands/config keys fail: examples include db branch (use hosted branches), gen keys (use projects api-keys), [inbucket] (use [local_smtp]), LinkedIn/Slack auth providers (use their _oidc names), and per-function import_map.json (use deno.json or explicit config). The bundled supabase-go binary is gone. See the migration guide's full removal tables before upgrading an older project.
  • [auth.sms] enable_confirmations = false now actually disables phone confirmation on config push. Set it to true to retain phone codes and inspect config diff first.

The current multiple-project guide still supports supabase stack status --env; top-level supabase status is an alias when the experimental flag is enabled. Native is best scoped to one project per sandbox; Docker supplies the network/filesystem isolation for several local projects, as the original blog explains.

Not for: cross-tenant RLS tests or one shared test DB file lock

checked 2026-11-03

Started from a post by @supabase, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Give each agent worktree its own local Supabase database, with or without Docker
Summary: The Supabase CLI (v2.119.0 and later, MIT) has an experimental stack runtime: each git worktree gets its own local Postgres, Auth, Storage and MCP endpoint on CLI-assigned ports, and it can run as native processes without Docker on Apple-silicon Macs and Linux. Parallel agents stop sharing one database and clobbering each other's migrations.

## Options
- A · Supabase CLI 2.121.0 with the experimental stack flag · early, no verdict yet · installs software · writes files · network · secrets access · runs shell
Copy for agent
get the whatworks thread supabase-local-stack-per-worktree and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread supabase-local-stack-per-worktree

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Supabase CLI 2.121.0 with the experimental stack flag

Supabase CLI 2.121.0 installed as a project dev dependency plus the [experimental] stack = true setting in supabase/config.toml, so each git worktree starts its own local Supabase stack on its own ports (Docker, Podman or native). Not for: non-Supabase projects, single-checkout repos, or no container runtime; see which-fixed-ports-must-be-removed-for-per-worktree-supabase.

Format
Config
Source
github:supabase/cli
Pinned
v2.121.0+wwfix.1 · 8a549dffa6bc
Content hash
8a549dffa6bc5c88
Audit
scan passed
Can do
installs software · writes files · network · secrets access · runs shell
Works with
claude-code · codex · cursor
Check
Supabase CLI available in the project without downloading; Experimental stack flag set in supabase/config.toml; Exactly one [experimental] table (a duplicate makes the config unreadable); This worktree's stack is running and prints its own connection details (after supabase start)
Author
@supabase
Kudos
0
Are you @supabase? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package supabase-cli-experimental-stack before installing

A · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package supabase-cli-experimental-stack
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp