Pull requests for your database.

Your agent writes to a real branch of production Postgres. You get every row it changed as a diff, and you approve it or throw it away. Merging back is the part nobody else does.

branch tier-upgrade-backfill agent: claude-code 2 added 1 changed 1 removed
~customers · id 3
tier
vipbecomespro
credits
80.50becomes130.50
+products · id 8
sku
LMP-01
title
Desk lamp
price
59.00
−order_items · id 2
order_id
1
qty
1
No conflicts with production

docker compose up -d Runs against any Postgres — RDS, Supabase, Neon, your own box.

Guardrails did not stop it

On 25 April 2026 a coding agent deleted PocketOS's production database and its backups in nine seconds. It hit a credential mismatch on a routine staging task, did not stop to ask, and found a token in an unrelated file that carried authority over the whole account.

Destructive-action guardrails, plan mode, tool-use safety and the founder's own project rules were all switched on that day. None of them fired.

Reported by The Register and The New Stack.

Sandboxes isolate the process, not the data. An agent in a microVM still connects to production over the network with real credentials. Sandbank puts the boundary around the rows instead.

Branch, inspect, merge

1

The agent asks for a branch

It gets a connection string with search_path already set. It writes ordinary SQL and never learns it is fenced in. The branch role can read and write its branch and nothing else in the database — not the production tables, not another branch, not the change log.

2

Every write is captured as a row

Twelve edits to one record read as one change. A record created and then deleted inside the branch reads as nothing at all. What you review is the net result, not a transcript.

3

You approve, and it lands in one transaction

Merging is three-way. If the branch changed notes while production changed email on the same record, both survive. If both changed the same field, that is a conflict and nothing is applied. Approval is bound to the exact plan you saw: if the agent writes again afterwards, the approval expires and comes back to you.

Branching costs nothing

A branch is not a copy. Tables become views over production plus a delta holding only the rows the agent touched, so branch time does not depend on database size. Measured on a 551 MB table of 5 million rows, Postgres 17:

Same table, same machine, one branch.
 SandbankCopying the data
Create the branch35 ms4 110 ms
Storage it occupies24 kB658 MB
Read one row by key1 ms1 ms
Write 100 rows14 ms14 ms
Full table scan163 ms52 ms

The last row is the honest cost: reading through the overlay adds a check against the delta, so a full scan runs about three times slower. Point reads and writes are unaffected, and a 300 GB database branches in the same 35 ms as a 551 MB one, because nothing is being moved.

Branching is solved. Merging is not.

  Branches data Merges data back Runs on your Postgres
NeonYesNo — reset from parent onlyNo, hosted
SupabaseSchema onlySchema onlyNo, hosted
DoltgresYesYesNo, it replaces Postgres
SandbankYesYes, with conflict detectionYes, any Postgres 15+

Hosted branching is copy-on-write at the storage layer, where a branch is a set of blocks. Two branches that wrote to the same block cannot be reconciled, which is why the only way home is to discard your work. Sandbank tracks rows, so it can tell you exactly which field moved and who moved it.

The same shape of billing follows from the same architecture. Neon charges $1.50 per branch per month, which is a fee on exactly the thing agents produce by the thousand. An overlay branch costs 24 kB and no compute, so Sandbank does not meter branches at all.

Free for yourself. Paid at work.

Read the source, run it on your own machine, use it on your own projects — free, for good. The moment it earns money for a company, it needs a licence. Agent data security from an enterprise vendor starts around $50,000 a year and most of them will not show a number without a sales call.

  Personal Team Scale
Price Free$29/mo$99/mo
Who it is for personal and non-commercialcompaniescompanies
Branches, diffs, merges unlimitedunlimitedunlimited
Isolated database role per branch yesyesyes
MCP server for agents yesyesyes
Approval gateway API —yesyes
Diff history you can read back 7 days90 days2 years

Branches are never metered, on any plan. Neon charges $1.50 per branch per month, which is a fee on exactly what agents produce by the thousand; an overlay branch costs 24 kB and no compute, so there is nothing to bill for.

History outside your window is kept, not deleted — it simply is not readable until the licence covers it. A lapsed licence never destroys the record of what an agent did to your database.

Source-available under the Business Source License — not an OSI open-source licence. You can read, modify and run the code; personal, academic and 30-day evaluation use is free; use inside a company needs a licence; and every version becomes Apache 2.0 four years after release.

Run it yourself

One container next to your database. Nothing is sent anywhere, and your database never has to be reachable from outside.

git clone https://github.com/trackme341-sys/sandbank && cd sandbank
cp .env.example .env
docker compose up -d

# point it at the database you want to branch
SANDBANK_TRUNK_URL=postgres://user:pass@your-host:5432/app

Review at localhost:8790. Agents connect over MCP: they can open a branch, read their own diff and propose a merge. Approving one is a person's job — there is no merge tool for agents unless you turn it on. Using it at a company? Set SANDBANK_LICENSE_KEY and the gateway API and longer history unlock.