← All work

Month-end reconciliation agent

The code decides, the model explains, the human approves. An agent that posts only what the evidence proves, and asks a person about everything else.

Collaborators
Our CTO, on the production build
Timeline
In production 2026. Rebuild in progress
Scope
US and UK books, QuickBooks Online
Built with
Python, Claude, synthetic data for the rebuild
Where it came from

I built it for my own month-end close.

As the first non-founder hire at a venture-backed startup, I prepared the close across US and UK bank accounts in QuickBooks Online. This agent was one of the AI-native workflows I built into the finance stack with our CTO. Together they took the monthly close from ten days to four, and the team still runs them.

The production version let the model make the accounting call on every line, and I reviewed the exceptions. It was fast, and it put judgement in the wrong place. So I'm rebuilding it in the open: every money decision moves into rules that can be repeated and audited, and Claude keeps the asking, explaining and investigating.

The problem

The bank feed is confident, and often wrong.

Accounting software suggests a category for every bank line and flags the ones it's sure about in green. A bookkeeper who trusts the green flags posts payroll to Salaries twice, expenses a currency transfer, and books a personal purchase that was refunded the same day.

So the work is slow: every line checked against bills, journals and receipts, and the odd ones chased with whoever knows. Next month the same questions come round again.

What I built

Post what's proven. Park the rest, with a question.

The agent decides one action per bank line: post, match, match with a remainder, transfer, exclude or park. A deterministic layer does the matching: amount and reference, then amount and counterparty within three days, plus rules for conversions, duplicates, payroll fragments and same-day refunds. A feed suggestion counts only if a vendor rule or an earlier decision agrees with it.

Claude handles what's left. It writes the reason a line was parked and the question to ask, citing the evidence it read. It never posts on its own judgement. After every action the agent checks that the change in balance equals what it meant to do, and stops if it doesn't.

Every figure in the report is tagged [read], [derived] or [inferred], so a reviewer knows what to spot-check. The report is written to be approved in two minutes.

Learning

It remembers your answers, and notices when they stop fitting.

Answers go into a learning log: a decision register, standing approvals and known traps, read first on every run. In the second month it handled four lines from memory that it had asked about the first time.

It also caught a stale decision. A 126.00 charge it had been told was billed quarterly came back after 32 days. Instead of applying the rule, it flagged that the rule no longer fit and asked again.

The eval

Two runs, scored against an answer key it never sees.

Run 1: 34 lines across four accounts. 18 posted, 5 matched, 2 transfer legs, 3 excluded with approval, 6 parked with questions. 24 of 24 balance checks passed.

Run 2: 16 lines. 4 answered from memory, 4 new questions, none repeated, and one stale decision flagged. Both runs were scored against an answer key the agent never sees, and each ends with a ten-question self-review.

Where it fails

Built to stop, not to guess.

I planted failures to test the controls. A wrong fee stops the run, a 1p imbalance is refused, and an answer it can't read saves nothing.

The limits are real too. So far it has seen 50 synthetic lines across two months, and it only knows the traps it has been shown. A new kind of transaction gets parked, which is safe, and slow until someone answers.