In this guide

A correct answer needs a repeatable method

A bank reconciliation can balance for the wrong reason. An assistant may remove an inconvenient transaction, mistake a bank charge for a timing difference, or adjust the ledger merely to reach zero. Persistent instructions should define how Codex reaches the answer, not simply demand accuracy.

Use AGENTS.md to record the working method for an accounting folder. Keep the month’s balances and evidence in separate source files, so next month’s run does not inherit an old figure as a standing rule.

Put the instructions where Codex will read them

Codex discovers AGENTS.md instructions along its working-directory path. More local guidance can override earlier guidance; AGENTS.override.md takes precedence over AGENTS.md in the same directory. Start in the intended project folder and ask Codex to list the instruction files it loaded.

Treat the file as operating guidance, not an access control. A sentence prohibiting posting does not remove a connector’s posting permission. Give the working account only the access needed for the task.

A small accounting instruction file

Copy this into the project’s AGENTS.md, then adapt the folder names:

Preserve files in inputs/. Write proposed outputs to outputs/. Identify the entity, period, currency and sign convention before calculating. Every adjustment must name its source file and row or page. Separate timing differences from proposed ledger entries. Do not invent missing evidence, post entries, send messages or change source records. If evidence conflicts, record both values and leave the item unresolved. Recalculate totals independently before delivery. Return the reconciliation, exceptions and proposed journals separately.

Add the approved accounting policy by reference. Do not paste a long policy manual into every task.

Test it with a known reconciliation

This fictional case uses SAR and no foreign currency. The bank statement closes at 98,500; the cash ledger closes at 101,000. A deposit of 4,000 is recorded in the ledger but has not reached the statement. An issued cheque of 1,500 has not cleared. The statement includes a 1,000 bank fee missing from the ledger. Supporting records confirm all three items.

Expected bank reconciliation: 98,500 + 4,000 − 1,500 = 101,000. That does not yet equal the adjusted ledger: 101,000 − 1,000 = 100,000. The correct output identifies an unexplained 1,000 difference; it must not declare the account reconciled.

Give specialists a narrow question

If the evidence spans many files, explicitly ask Codex to delegate. A bank specialist can match statement transactions while a ledger specialist checks postings. These independent checks can run in parallel. The lead must wait for both before combining their results.

A separate reviewer should reproduce the arithmetic from the original inputs and challenge any unexplained adjustment. Naming the same assistant “reviewer” in the next paragraph is not evidence of independent review. For this small example, a single careful pass may be enough.

Recover without hiding the failure

Ask for a completion record: loaded instructions, input filenames, output files, unresolved items and checks performed. If a file is unreadable, the expected result is an explicit limitation, not a fabricated balance.

If Codex writes outside the agreed output folder, stop the run, inspect the changed files and restore from a known copy before retrying. Tighten actual permissions where possible. The useful test is simple: can a reviewer trace the unexplained 1,000 to the evidence without rerunning the conversation?

Sources

Sources checked ·