Blog · Governing · · 6 min read

Why parallel agents need transaction locks

When dozens of automated assistants act at once on shared databases or agency funds, checking each one in isolation creates a dangerous illusion of control. Real safety requires external transaction locks that serialize state changes before actions take effect.

Watercolour of two clerks at a wooden counter reviewing a shared ledger book.

When dozens of automated assistants update shared databases or municipal budgets at the same time, checking each prompt in isolation causes race conditions and budget overruns. Preventing double allocations requires external stateful transaction locks that serialize changes before any tool call takes effect.

In a demo with one user and one task, testing whether a prompt denies unauthorized commands or passes an output filter looks straightforward. In public agencies, hospitals, and municipal offices, however, many automated workflows read and write the same records simultaneously.

Safety cannot live inside the language model alone. If the underlying data store lacks transactional locks and external state governance, valid individual decisions can combine into an administrative disaster.

The concert ticket problem

Imagine a small theatre selling tickets for an evening show. Two ticket sellers stand at separate windows, each holding a blank notebook. A customer walks up to the first window and asks for front-row seat four. The seller checks their own notebook, sees no record for seat four, and takes the payment.

At the exact same second, another customer approaches the second window and asks for the same seat. The second seller checks their blank notebook, confirms the seat looks open, and takes the payment. Both sellers followed their instructions perfectly. Neither made an error. Yet two families now hold tickets for the exact same seat.

In traditional software, engineers solved this problem decades ago through database transactions. Before a seller can write to the ledger, the database places a lock on seat four. The second seller must wait until the first sale finishes or aborts. The transaction completes cleanly, the lock releases, and the second customer gets a prompt notice that the seat is taken.1

Why stateless prompt guards fail in the wild

Many modern agent platforms forget this hard-won lesson. They wrap each assistant in extensive prompt instructions, guardrails, and output classification filters. These safeguards inspect each incoming command and outgoing tool call in isolation, asking whether the request seems polite, helpful, and within scope.

What an isolated prompt check cannot see is what another assistant is doing three milliseconds away. Consider a municipal housing fund with a remaining balance of ten thousand dollars. Assistant A receives an emergency grant application for eight thousand dollars and verifies the applicant qualifies. Assistant B receives a separate application for seven thousand dollars and verifies that applicant qualifies too.

Both assistants read the available balance as ten thousand dollars. Both safety filters confirm that eight thousand and seven thousand are each below the ten-thousand-dollar ceiling. Both assistants fire their disbursement tools simultaneously. The municipal bank account overdraws by five thousand dollars. Researchers studying agent governance call this stale authorization: the approval was correct when given and wrong by the time the money moved.2

No prompt engineering fixes this failure mode. The failure happened in the gap between reading the shared state and committing the external effect.

Stateless prompt guards versus stateful transactional governance Diagram showing how stateless prompt guards permit concurrent race conditions and budget overdraws, while an external stateful governance proxy uses locks and validation to serialize operations safely. STATELESS PROMPT GUARDS Race hazard 1. Isolated Ingestion Requests evaluated in separate contexts 2. Blind Preconditions Checks prompt rules without locking state 3. Concurrent Execution Simultaneous writes commit in parallel 4. Failure Mode Double allocations and budget overdrafts No locks · Corrupted agency ledger STATEFUL GOVERNANCE PROXY Protected 1. Brokered Execution External proxy intercepts tool actions 2. Transactional Lock Acquires exclusive lock on shared records 3. Serialized Validation Verifies preconditions against live state 4. Atomic Commit & Receipt Safe commit or automatic clean rollback Locks active · Auditable receipts Stateless prompt guards versus stateful transactional governance (Mobile view) Stacked mobile diagram showing how stateless prompt guards cause race conditions on top, while stateful governance proxies serialize actions below. STATELESS PROMPT GUARDS Race hazard 1. Isolated Ingestion Requests evaluated in separate contexts 2. Blind Preconditions Checks prompt rules without locking state 3. Concurrent Execution Simultaneous writes commit in parallel 4. Failure Mode Double allocations and budget overdrafts No locks · Corrupted agency ledger STATEFUL GOVERNANCE PROXY Protected 1. Brokered Execution External proxy intercepts tool actions 2. Transactional Lock Acquires exclusive lock on shared records 3. Serialized Validation Verifies preconditions against live state 4. Atomic Commit & Receipt Safe commit or automatic clean rollback Locks active · Auditable receipts
Stateless prompt guards examine requests in isolation and cause race conditions when parallel agents read stale state. A stateful governance proxy locks shared records, verifies preconditions, and serializes updates before tool calls take effect.

What stateful governance adds

To make concurrent assistants safe, organizations need an external stateful governance proxy. This proxy sits outside the language model and mediates every tool execution that reads or alters shared resources. It brings three classic database guarantees into agent architectures.

First, it enforces strict concurrency control. When an assistant attempts an irreversible action, such as spending funds or changing a legal status, the proxy acquires an explicit lock on the affected records. Competing actions must wait in an orderly queue until the first transaction completes.

Second, it verifies state serializability before committing external effects. The proxy checks that the facts the assistant relied on when planning its action remain true at the moment of execution. If another process modified the budget balance in the meantime, the proxy aborts the transaction safely.

Third, it provides automated rollbacks and signed transaction receipts. When a multi-step workflow fails midway through execution, the proxy rolls back partial updates to restore the agency ledger to a known clean state. It hands the user and the administrator an auditable receipt proving who acted and what changed.

What public agencies should require

Public procurement rules for artificial intelligence often focus on model benchmarks and ethics guidelines. While responsible guidelines matter, they cannot replace rigorous operational safeguards. Public officials buying or building agentic systems should require three concrete technical commitments from vendors.

Tenders should mandate external stateful proxies for all consequential tool calls, forbidding systems that rely solely on prompt-based self-policing. Contracts should require explicit transaction isolation levels, so that concurrent automated processes do not corrupt shared public registries or overspend communal budgets. Finally, agencies should require verifiable transaction receipts saved to independent storage. The Council of Europe's AI convention already asks states to keep AI systems accountable and open to oversight; these commitments are one practical way to do that.3

Software that serves the public must handle the rush of everyday civic life without collapsing under simultaneous demands. Grounding automated agents in stateful transaction locks helps our institutions stay steady, predictable, and fair.

This analysis pairs with our public official guidance in Shared Horizon, which details actionable procurement cards for stateful governance and concurrency controls.

Sources

1. Hal Berenson, Philip A. Bernstein, Jim Gray, Jim Melton, Elizabeth O'Neil and Patrick O'Neil, "A Critique of ANSI SQL Isolation Levels," in Proceedings of the 1995 ACM SIGMOD International Conference on Management of Data (1995), 1–10, doi:10.1145/223784.223785.

2. Yuxiang Peng and Xiaodi Wu, "Stateful Governance for Concurrent Agentic Systems," arXiv preprint arXiv:2608.02764 (2026).

3. Council of Europe, "Framework Convention on Artificial Intelligence and Human Rights, Democracy and the Rule of Law (CETS No. 225)," Council of Europe Treaty Series (2024), coe.int.

← All articles

Recent articles

Value ·

Why AI resumes and hiring bots scramble who gets hired

Automated hiring portals scramble who gets hired when job seekers use AI models to rewrite resumes for keyword-scoring bots, displacing qualified workers across occupations. Recognizing real work requires verifiable task receipts, machine-speed mutual net-zero transparency between personal and employer agents, and cooperative ownership as automation grows.

Read · 8 min

Governing ·

Why secret AI models behind lab walls cannot prove they are safe

Keeping stronger AI models hidden inside company walls to build successor systems blinds the public while missing real-world failures that surface strictly in open use. Global transparency requires signed compute receipts, expiring permissions, and machine-speed mutual net-zero transparency across personal and community agents.

Read · 8 min

Seeing ·

Why society needs civic electronic warfare for rogue sensors

Satellite constellations and street sensor fleets have tripled under private corporate ownership while pixel blurring fails against modern AI. Surviving superhuman and corporate-controlled agent swarms requires a public electronic-warfare shield that detects non-participating sensors, alerts participants to information leaks, and expels off-contract espionage from trade networks.

Read · 9 min