Both agents checked the balance
Two render jobs cost €8 apiece. The studio has €10. The interesting part happens between checking the balance and spending it.
Suppose the studio has €10 left for illustration. One agent brings back an €8 quote for the cover going to press today. Another finds an €8 render for next week’s proof. Each has checked the balance. Each can tell the editor, quite accurately, that its job fits.
I’d show the editor both quotes. When they choose today’s cover, I’d make approval and reservation one transaction. The interface can confirm the purchase allowance only after that transaction succeeds. A second balance check a moment before checkout leaves the same gap as the first one. The decision has to hold when the ledger changes.
What the second request sees
You can try this with SQLite and a disposable table. The last line of each pair reports how many rows the update changed and how many cents remain.
create temp table budget (
available_cents integer not null check (available_cents >= 0)
);
insert into budget values (1000);
update budget set available_cents = available_cents - 800
where available_cents >= 800;
select changes(), available_cents from budget;
update budget set available_cents = available_cents - 800
where available_cents >= 800;
select changes(), available_cents from budget;
The first result is (1, 200). One row changed and 200 cents remain. The second is (0, 200). Next week’s proof can wait. Both updates asked the database to test the allowance as it wrote the new balance.
Run those statements in order and you’ve tested the arithmetic on one row. In a working studio, the person closing the books also needs to know whose €8 is on hold. Give the approved quote a unique purchase ID. Write the reservation against that ID and lower the available balance in the same transaction. A repeated request for that purchase returns the existing reservation. We tried the race with two SQLite connections to a fresh file. Across 20 trials, only one €8 request reserved funds each time. Replaying the winner left €2 available. Reusing its ID at a different price raised an error. Either job can win this race. If the deadline decides which cover should get the money, the editor needs to choose before either job reaches the ledger. Run the two-worker example
What goes in the studio agent’s tool menu
The agent that scouts render services needs permission to submit a quote for review. I’d stop its write access there. Its proposal names the vendor, quote revision, cover, price, currency and expiry. The editor approves that exact proposal. If the €8 quote now buys a watermarked proof, the work on order has changed even though the price still fits. Send it back to the editor.
You can see the distinction in the FrankX Agent Payments Guard. One tool checks a signed mandate, including its amount, currency and expiry. A separate tool checks limits from the operator’s policy file and can return within-cap. The guard’s signed record has no field for the vendor or the cover. A positive cap check alone says too little to send an order. I would keep the settlement credential in the studio’s existing checkout, under the person responsible for the purchase.
The guard is an unaudited TypeScript reference. Its separate 20-test suite passed. In one test, an audit write fails. The guard returns an error and leaves the mandate unused. That is a useful failure to inspect when deciding what an agent’s tools should promise. Read the guard and its tests at the reviewed revision
The missing receipt
Suppose checkout times out. Did the studio buy the cover? Until the provider answers, keep the €8 reserved. For a retry through Stripe’s v1 API, keep the original key and parameters within its retention window. Stripe can prune a key after at least 24 hours. Its webhooks can also deliver an event twice. Keep the studio’s purchase ID through reconciliation so a lost response or repeated notification can be matched to the same order. Stripe idempotent requests · Stripe webhook delivery
The same question comes up when a studio replaces its company card with a wallet. With Stripe Issuing, spend totals can take up to 30 seconds to reflect a charge. With a Safe smart account, the owners set a signature threshold for standard transactions, and enabled modules have a separate execution path. For this €8 render, I’d use the checkout the studio already reconciles. Stripe Issuing controls · Safe smart account concepts
The editor taking over tomorrow should be able to open today’s cover, find the €8 reservation and see whether the charge settled. If the vendor confirms the order was cancelled without a charge, the studio can release the €8 and buy next week’s proof. If today’s cover was paid for, the editor knows exactly where the money went.
Read on FrankX.AI — AI Architecture, Music & Creator Intelligence
Stay in the intelligence loop
Field notes on AI systems, production patterns, and builder strategy.