{"slug": "supabase-branch-merges-now-fail-with-development-only-tokens", "title": "Supabase Branch Merges Now Fail With Development-Only Tokens", "summary": "Supabase now rejects merges of a preview branch into production unless the scoped access token performing the merge holds Production Branches read-write permission, a breaking change the company listed in its Nov. 16 changelog and said has applied since Nov. 12. The rule covers the Management API merge endpoint (POST /v1/branches/{branch_id_or_ref}/merge) and the MCP server's merge_branch tool, which now require the branching_production_write fine-grained permission; tokens limited to Development Branches read-write can still create, push, reset and delete preview branches but cannot merge, and classic personal access tokens are unaffected. Supabase's migration path is to create a new token under Account > Access Tokens with Production Branches read-write, since existing tokens' permissions cannot be edited, and use it only for the merge step, while the company said it plans a separate Merge permission so a token could merge without full production write access.", "body_md": "# Supabase Branch Merges Now Fail With Development-Only Tokens\n\nCI merge steps that use a development-only token now hit a permission error. Mint a Supabase token with Production Branches read-write for merges.\n\nSupabase now refuses to merge a preview branch into production unless the scoped access token doing it can write to production, so a CI job or agent that merges with a development-only token gets a permission error instead of a deploy. Supabase listed the change as breaking in its Nov. 16 changelog and said it has applied since Nov. 12 ([Supabase changelog, Nov. 2026](https://supabase.com/changelog/branch-merge-requires-production-write)).\n\n## What Changed\n\nThe rule covers two paths: the Management API’s merge endpoint (`POST /v1/branches/{branch_id_or_ref}/merge`) and the MCP server’s `merge_branch` tool. A scoped personal access token now needs the Production Branches: Read-write permission for either one. Supabase’s API reference for the endpoint now lists `branching_production_write` as the required fine-grained permission.\n\nA token with only Development Branches: Read-write can still create, push, reset and delete preview branches, Supabase said. It just can’t merge.\n\nSupabase said a merge writes a branch’s changes to production, so a development-only token could reach production through it.\n\nClassic personal access tokens are not affected, according to the changelog. If nobody acts, merges with development-only tokens fail, and Supabase said projects, branches and data stay unchanged.\n\n## How to Fix It\n\nSupabase’s migration steps:\n\n1. Create a new token under Account > Access Tokens with Production Branches read-write. Existing tokens can’t have their permissions edited.\n2. Use the new token only for the merge step in CI or scripts.\n3. Keep the development-only token for the rest of the preview-branch work.\n\nThe company also said it plans a separate Merge permission, so a token could merge without full production write access.\n\n## Who Gets Hit\n\nScoped tokens are recent. Supabase began rolling them out in alpha on Aug. 10 and made them generally available on Oct. 6, when its MCP server began enforcing their permissions. Teams that gave their agents and pipelines narrow, development-only tokens since then are the ones this change breaks. Anyone still on a classic token sees nothing.\n\n## The Take\n\nThis is the right fix, and it exposes a hole that should worry anyone who set up least-privilege tokens in the last two months. For weeks after GA, a token labeled for development could reach production through a merge. If an agent held one, the agent could ship.\n\nThe fix is also awkward. Until the separate Merge permission arrives, the only way to keep merging from CI is to hand that step a token that can write to production in general. Keep that token in its own secret, wire it into the merge job alone and keep it away from any agent that only needs preview branches. Then check every pipeline that merged since Nov. 12. A merge job that failed and got retried or ignored means production is behind the branch the team thinks shipped.", "url": "https://wpnews.pro/news/supabase-branch-merges-now-fail-with-development-only-tokens", "canonical_source": "https://firerun.io/supabase-branch-merge-production-token-2026/", "published_at": "2026-11-20 00:00:00+00:00", "updated_at": "2026-12-05 10:46:41.766646+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-tools"], "entities": ["Supabase", "Management API", "MCP server", "merge_branch", "branching_production_write"], "also_reported_by": [], "takeaway": "Scoped Supabase tokens need the Production Branches read-write permission (branching_production_write) to call the merge endpoint or MCP merge_branch tool, so CI merge jobs must use a separate production-write token while development-only tokens keep handling preview-branch work.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/supabase-branch-merges-now-fail-with-development-only-tokens", "markdown": "https://wpnews.pro/news/supabase-branch-merges-now-fail-with-development-only-tokens.md", "text": "https://wpnews.pro/news/supabase-branch-merges-now-fail-with-development-only-tokens.txt", "jsonld": "https://wpnews.pro/news/supabase-branch-merges-now-fail-with-development-only-tokens.jsonld"}}