Branch-per-agent database: every AI agent writes to its own mergeable branch first
Antique-Willow-5841 · reddit · 2026-10-15
Trigger: an agent with write access to a production CRM deleted all lead lists — but read-only wasn't an option since it needed to write. The author is building a branch-per-agent database: each agent gets a private copy ready in under a millisecond, writes freely, then a human reviews row-by-row diffs and merges or discards.
Design details:
- Row-level three-way merges; concurrent production edits to the same row never auto-merge
- The DB records what the agent read; if that data changed mid-run, the merge is held
- Custom SQL checks run against merge results, catching changes fine alone but wrong together
- Rules govern auto-merge: row caps, no deletes, human-required tables; limits counted across the whole run so split deletes can't evade them
- Queued emails/webhooks fire only on merge; agent claims never trusted
Speaks the Postgres protocol (psql and standard drivers work). Public repo, solo-built; seeking real-world testers, Rust devs, and critics.
Related event: Developer Builds Git-Style Branched Postgres After AI Agent Wipes CRM Data(3 posts)→
More from coding & agent
- Palo Alto Networks ships Cortex XCOR: AI SRE agent diagnoses alerts in under 3 minutes — shashib · 2026-10-17
- HF dev begs OpenAI/Anthropic to fix agents picking the wrong Chrome window — NielsRogge · 2026-10-17
- An agent negotiated a 3PL contract in 3 days, end to end — aarthir · 2026-10-17
- Gemini 3 vs Opus 4.5 vs GPT-5.1 vs Grok 4: same-prompt 3D diorama showdown — cedric_chee · 2026-10-17
- Reverse-engineering OpenAI Atlas browser's system prompt with Claude Code — DionysianAgent · 2026-10-17
- Hugging Face Hub adds RL Environment category with 153 agent-ready environments — mervenoyann · 2026-10-17