Intercompany reconciliation is one of the most persistent bottlenecks in the monthly close. Every legal entity in a group records its own version of the same transaction, and by the time the numbers reach consolidation, they rarely agree. A transfer priced at one value in the seller’s books shows up at a different value in the buyer’s, a loan accrues interest on one side but not the other, and a management fee gets booked to the wrong cost center. Controllers then spend days chasing differences through spreadsheets, email threads, and shared drives, matching invoice by invoice until every intercompany account nets to zero.
The friction is structural, not personal. Intercompany data lives across multiple ERPs, in different charts of accounts, in different currencies, and often in different formats. The reconciliation itself is repetitive pattern-matching work: compare two balances, identify the mismatch, trace it to a source document, and post the correcting entry. That is exactly the kind of high-volume, rule-based work that Claude Code can automate, because Claude Code can read files, write scripts, run them, and iterate on the output inside your own environment.
Instead of manually exporting trial balances and reconciling them by hand, you can give Claude Code your entity-level files, your matching rules, and your materiality thresholds, and have it produce a reconciliation workbook with matched pairs, unmatched items, likely root causes, and suggested adjusting entries. The controller reviews and approves; the machine does the matching. This post walks through the two prompts that make this work: one to build the reconciliation engine, and one to generate the exception report your reviewers will actually use.
What you need before you start
Claude Code works best when it has clean inputs and explicit rules. Before running either prompt, export the intercompany trial balance for each entity as CSV or markdown, confirm your matching tolerances (absolute amount and FX variance), and decide which account pairs should net against each other. The more precise your context file, the fewer clarifying questions Claude will need to ask.
First, read these files completely before responding:
[ic_tb_entity_a.csv] — intercompany trial balance for Entity A, with columns: account_code, counterparty_entity, currency, debit, credit, document_ref
[ic_tb_entity_b.csv] — intercompany trial balance for Entity B, same schema
[ic_tb_entity_c.csv] — intercompany trial balance for Entity C, same schema
[matching_rules.md] — my matching logic: which account pairs net against each other, tolerance thresholds, FX rate source, and materiality cutoff
[chart_of_accounts.md] — the group chart of accounts mapping each entity’s local accounts to the group intercompany accounts
Here is a reference for what I want to achieve:
[Upload last month’s reconciliation workbook as markdown, or describe it: one tab per entity pair, matched items listed first, unmatched items below with a variance column and a root-cause note.]
Here’s what makes this reference work:
Every matched pair shows both source documents side by side. Unmatched items are never silently dropped; each carries a variance amount, a variance percentage, and a short root-cause note such as timing difference, FX difference, missing accrual, or misposted entity. The workbook nets to zero at the group level, and any residual is explained in a summary block at the top.
Here’s what I need for my version / SUCCESS BRIEF:
Type of output + length: a runnable Python script plus a reconciliation output file in markdown, one section per entity pair
Recipient’s reaction: the controller should be able to open the output and immediately see which items are clean and which need action, without re-running any matching themselves
Does NOT sound like: a raw data dump, a list of every transaction with no grouping, or a script that fails silently on schema mismatches
Success means: 100 percent of intercompany balances are either matched within [TOLERANCE] or listed as exceptions with a root-cause category, and the group-level residual is zero or fully explained
My context file contains my standards, constraints, and audience. Read it fully before starting.
DO NOT start executing yet. Ask clarifying questions first.
Give me your execution plan (5 steps max) before you begin.
Once the engine runs cleanly, the harder problem is communication. A reconciliation workbook is only useful if the people who own the exceptions can act on them. That means the output needs to be organized by owner, ranked by materiality, and written in plain language rather than ledger codes. The second prompt turns the raw reconciliation output into an exception report that entity controllers can work from directly.
Turning output into action
Run this second prompt after the first script has produced its output. Point Claude Code at the reconciliation file and your entity contact list, and it will group exceptions by owner, draft a short explanation for each, and suggest the correcting entry. Reviewers should still approve every entry, but the drafting work disappears.
First, read these files completely before responding:
[reconciliation_output.md] — the matched and unmatched intercompany items produced by the reconciliation script
[entity_contacts.md] — the list of entity controllers, their entities, and their email addresses
[adjustment_policy.md] — my rules for when an adjusting entry can be auto-suggested versus when it must be escalated to the group controller
Here is a reference for what I want to achieve:
[Upload a prior exception memo as markdown, or describe it: a short memo per entity, opening with the total unresolved variance, followed by a table of items with amount, counterparty, root cause, suggested action, and due date.]
Here’s what makes this reference work:
Each memo leads with the number that matters, the total unresolved variance, so the reader knows immediately whether this is a five-minute task or a two-hour task. Every item names a specific action, not a vague instruction to investigate. The tone is direct and neutral, with no blame language and no filler.
Here’s what I need for my version / SUCCESS BRIEF:
Type of output + length: one memo per entity controller, 150 to 250 words each, plus a one-page group summary at the top
Recipient’s reaction: each controller should know exactly which items are theirs, what to do next, and by when, without needing to open the full workbook
Does NOT sound like: an audit report, a generic reminder email, or a list of account codes with no explanation
Success means: every exception item is assigned to exactly one owner, every memo is under 250 words, and the group summary reconciles to the total exception amount in the reconciliation output
My context file contains my standards, constraints, and audience. Read it fully before starting.
DO NOT start executing yet. Ask clarifying questions first.
Give me your execution plan (5 steps max) before you begin.
The practical tip that matters most: keep your matching rules file under version control. Every time a new exception category appears, add it to the rules file rather than patching the script by hand. Over three or four closes, that file becomes the institutional memory of how your group reconciles, and Claude Code gets sharper with each cycle because the rules get more specific.
Start with a single entity pair this month. Run the first prompt, review the output line by line, and correct the matching rules where Claude guessed wrong. Once one pair reconciles cleanly, expand to the full entity list and add the exception report prompt. The goal is not to remove the controller from the process, it is to move the controller from matching transactions to reviewing judgments, which is where their expertise actually adds value.
Published on 6 December 2026 on growwithgpt.com
