A customer applies for a loan. A lending agent, built by a vertical AI company and deployed by the bank, rejects the application in seconds. The customer asks why, gets a generic reply, and files a complaint. A few months later the complaint is a court claim and a regulator has written to the bank asking for the file.

Now two organisations have the same problem from opposite sides. The bank is the lender and answers to the customer, the court and the supervisor. The vendor built the agent and answers to the bank, under a contract, and possibly to a regulator of its own. Each holds part of the evidence. Neither can prove the whole story. And each has a reason to suspect the other of telling it differently.

This article defines that problem from both angles, then shows how a cryptographic hash chain, implemented with ZizkaDB, lets both sides produce one shared record that neither can quietly change.

A note on scope. This is general information, not legal advice. Which rules apply depends on jurisdiction, product, customer type and how much a human is involved. Take advice from counsel and your compliance team. The scenario is a composite, not a real case. Parameter names in code are illustrative. ZizkaDB records events and shows whether the record has been altered. It does not decide whether a rejection was lawful, judge the model, or deliver compliance.

The scenario

Call the bank Meridian Bank and the vendor Lumen AI, both invented. Lumen supplies a credit assessment agent that reads an application, pulls bureau data and bank statements through tools, applies policy documents and returns a recommendation. Meridian's process lets the agent decline small personal loans without a human, and routes borderline cases to an underwriter.

A customer, Ms Alvarez, is declined. The notice says her application did not meet credit criteria. She believes the decision relied on a wrong bureau entry and on her postcode. She requests the logic behind the decision, escalates to the regulator and finally sues.

Four things now happen at once.

The court asks Meridian to explain and defend the decision.
The regulator asks how the system works, what logs exist and whether the human oversight was real.
Meridian asks Lumen for evidence, as the contract allows.
Lumen, with other bank customers on the same platform, asks its own counsel how much to disclose.
What the rules ask for

The details vary by country, but a pattern is clear from the sources. It is worth stating plainly, because the technical problem follows from it.

Explanation of automated decisions. Under the GDPR, a person subject to a decision based solely on automated processing with significant effects has protections under Article 22, and a right under Article 15(1)(h) to meaningful information about the logic involved. In February 2025 the Court of Justice of the EU, in the Dun & Bradstreet Austria case on automated credit assessment, said the data subject is entitled to an explanation of how the decision was taken, and that it must enable the person to understand and challenge it. The Court did not require disclosure of the algorithm, and it recognised a way to handle trade secrets through review by a court or authority.

Consumer credit rules. The EU's revised Consumer Credit Directive applies from 20 November 2026. Commentary on it says that where the creditworthiness assessment involves automated processing of personal data, the consumer has the right to human intervention, and may request an explanation of the assessment and a review of the decision. Member states transpose it, so national rules matter.

The AI Act. Evaluating the creditworthiness of natural persons or establishing their credit score is listed as high-risk in Annex III, point 5(b). Deployers of high-risk systems must keep the logs the system generates, where under their control, for at least six months, and financial institutions have specific governance arrangements. The application date for these Annex III obligations was moved by the Digital Omnibus to 2 December 2027, so check the final text and your own timeline.

United States. The Equal Credit Opportunity Act and Regulation B require a statement of specific reasons for adverse action. The CFPB's Circulars 2022-03 and 2023-03 said that creditors cannot use complex algorithms when that means they cannot provide specific and accurate reasons, and that sample checklist reasons are acceptable only when they reflect the real principal reasons. Regulatory guidance has been shifting, so check what currently stands. Fair lending law adds exposure if the decision shows a discriminatory effect.

Operational resilience and outsourcing. In the EU, banks that use an ICT or AI vendor are also subject to third-party risk rules, and supervisors expect the bank to keep control of outsourced functions. The legal responsibility for the decision stays with the bank.

The common thread: the bank must be able to say what the agent used, what rules applied, why the outcome followed, and whether a human could and did intervene. In a dispute, it must be able to show that its account is the real record and not a story written afterwards.

The problem from the bank's side

Meridian's difficulties are less about the model than about evidence.

  1. The decision is not in the bank's systems. The agent ran in Lumen's cloud. Meridian holds the application, the outcome and a notice. The retrieval steps, the tool results, the prompt and the policy version sit in the vendor's logs.

  2. Responsibility does not move with the data. The bank is the lender. It cannot answer a court by saying the vendor knows. Regulators have been consistent that outsourcing a function does not outsource accountability.

  3. The questions are specific. A judge or supervisor will ask:

What data about the customer did the agent use, and as of when?
Was the bureau entry she disputes part of the input?
Did the postcode or any proxy for a protected characteristic feed the decision?
Which policy version and model version were live that day?
Was the rejection reviewed by a human, and what did the reviewer see?
Did the stated reason in the notice match what drove the outcome?
Is the record you are showing us the one made at the time?

  1. The reason in the notice may not match the cause. If the agent generated a plausible rationale after reaching its output, the notice may state a principal reason that the record cannot support. In the US that is directly relevant to the requirement for specific and accurate reasons.

  2. Human oversight is hard to prove. If an underwriter was supposed to review, the bank needs evidence that they saw the case, what they saw and what they decided, and that it was not a rubber stamp.

  3. Pattern risk. One customer sues. The regulator asks how many others were treated the same way. Without linked records, finding every decision that used the same faulty bureau entry or the same policy version is weeks of work.

  4. Authenticity. Even good logs can be challenged. If the other side suggests that records were edited after the complaint, the bank has to show that they were not.

The problem from the vendor's side

It is tempting to see the vendor as the villain. Lumen's position is also difficult.

  1. It carries contractual exposure. The contract probably has warranties, audit rights, indemnities and service levels. If the bank is held liable, it will look to the vendor. Lumen needs evidence that the agent worked as specified and that the bank's instructions, data or overrides shaped the outcome.

  2. It cannot disclose everything. Prompts, model configuration and policy logic are commercial assets, and logs from a multi-tenant platform may include other customers' data. Handing a court or regulator an unfiltered dump is risky. Refusing to share invites suspicion and may breach the contract.

  3. It must prove what it did not do. If the bank changed a policy file, altered a threshold or overrode a recommendation, Lumen wants that on record. If Lumen shipped a model update that shifted behaviour, the bank will want that on record. Each side has an incentive to keep the other's changes visible and its own mistakes quiet.

  4. Its own regulatory position is moving. Under the AI Act, providers of high-risk systems have their own obligations, including technical documentation and automatic recording of events. In some markets, vendors of critical ICT services to banks are under direct oversight.

  5. Its reputation travels. A single high-profile dispute can chill sales to every other bank.

  6. It needs a clean exit. If the evidence shows the agent behaved as designed and the bank's process was the issue, Lumen needs to show that convincingly. If the evidence shows a defect, Lumen needs to find it, fix it and scope the impact before the regulator does.

Where the interests collide
Question Bank wants Vendor wants
Who holds the record? Control, access on demand Protection of IP and other customers' data
Who proves what was changed? A view of every vendor-side change A view of every bank-side override
What gets disclosed to a court? Enough to defend the decision Only what is necessary
Who can edit logs? No one, after the fact No one, after the fact
Who is believed? The bank's account The vendor's account

Notice the last row. In a dispute, each side's record will be suspected by the other. A log kept by one party and held under its own admin access proves less than it appears to. The strongest evidence is a record that neither party could have changed without being caught.

Why ordinary logs fail here
They are mutable. Someone with access can edit or delete a line, and nothing shows it happened.
They are fragmented. Application logs, model provider logs, tool logs and case management records sit in different systems with different clocks.
They show sequence, not cause. They say what happened next, not what influenced it.
They lack versions. Which prompt, policy and model were live is often recoverable only from deployment history.
They have short retention. Thirty days of logs do not cover a claim filed eight months later.
They record the story, not the inputs. The agent's stated reason is easy to keep. The data it actually used is easier to lose.

Imagine the timeline. Month one: the decision. Month three: the complaint. Month six: the regulator's request. Month nine: the claim. By then the bureau data has changed, the prompt has had two releases, the engineer who built the integration has left and the logs have rolled over. Both sides assemble what they can, and the case turns on whose reconstruction a court finds credible.

How the dispute unfolds when each side acts alone

It helps to follow the same dispute step by step, with no shared record.

Month 3, the complaint. Meridian's complaints team pulls the case. It has the application, the outcome and the notice. It asks Lumen for the decision details. Lumen's support team replies that the agent applied the retail policy and returned a decline, and attaches a summary generated from its logs. The summary is readable and short. Nobody at the bank can tell whether it is a faithful extract or a tidy narrative.

Month 5, the regulator. The supervisor asks Meridian for the full decision file, the version of the model and policy in force, evidence of human oversight and the number of similar decisions. Meridian forwards the questions to Lumen. Lumen's counsel advises caution, because the platform serves other banks and the prompt is a trade secret. Weeks pass in negotiation over what can be shared and in what form. The regulator reads the delay as a sign that the bank does not control its own process.

Month 7, the discovery of a change. While assembling the file, Lumen's engineers find that a policy threshold was adjusted two weeks before Ms Alvarez applied, at the bank's request. The bank's records of that request are in an email thread nobody can find quickly. Lumen says the change was authorised. The bank says it asked for a trial, not a production change. Each side now doubts the other's account, and the contract dispute begins alongside the customer claim.

Month 9, the claim. Meridian's counsel needs a witness who can explain the decision. The engineer who built the bureau integration has left Lumen. The logs from month one have been rotated under the retention policy. What exists is a mix of exports, summaries and recollections. The other side argues that the bank cannot show what the agent actually used, that the postcode may have mattered, and that the human review was a formality. Meridian cannot rebut any of it with evidence anyone will accept as original.

The outcome. Even if the decline was perfectly reasonable, the bank is in a weak position, because reasonableness has to be shown and not asserted. It settles, pays more than the loan was worth, and spends months of management time. The regulator opens a wider review of the portfolio. Lumen loses the renewal and spends the next year answering questions from its other customers.

None of this requires bad faith. It requires only that the evidence was scattered, mutable and held by parties with opposed interests. That is the normal state of affairs in most deployments today.

The obvious fixes, and why they fall short

Most teams reach for one of four remedies. Each helps a little and each leaves the core problem in place.

Keep more logs. Longer retention helps with timing. It does nothing about mutability, fragmentation or the missing link between cause and effect. A larger pile of editable records is still editable.

Ask the vendor for a signed statement. An attestation from Lumen that the agent behaved as designed is useful context. It is an assertion by an interested party, not evidence the bank can check, and the other side will treat it as such.

Rely on contractual audit rights. The contract may let the bank inspect Lumen's systems. Inspection after a dispute begins means looking at records the vendor controlled throughout. It also takes weeks, and it does not tell the bank whether the records were changed.

Add a human to every decision. More review can reduce risk, and in some jurisdictions the right to human intervention is built in. A reviewer who sees a thin summary and clicks approve adds little. Unless the review itself is recorded with what the person saw, the bank cannot show that oversight was real.

What these have in common is that they add effort without adding verifiability. The missing ingredient is a record that both parties can check independently and that neither can alter unnoticed.

What both sides need

Strip the problem down and it asks for five properties.

A causal record per decision, from the application to the outcome, including the data used, the rules applied, the versions in force and any human review.
Written at the time, not rebuilt later.
Tamper-evident, so that any later edit, deletion or reordering is detectable by either party.
Shared in a way that respects confidentiality, so each side can verify the record without seeing what it should not.
Exportable and verifiable by a third party, such as counsel, an expert, a court or a regulator.

A hash chain provides the third property, and a causal event model provides the first. The rest is design.

How a hash chain solves the trust problem

A hash chain works like this. Each recorded event includes a cryptographic fingerprint, a SHA-256 hash, of its own content together with the hash of the event before it. Change one event, and its fingerprint changes. That breaks the link to the next event, and the next, all the way to the end. Delete an event, and the chain no longer joins up. Reorder events, and the same thing happens.

So anyone who holds the latest hash, the chain head, can later check whether the full history still produces it. If it does, the history is unchanged since that head was recorded. If it does not, something was altered.

What makes this useful between two distrustful parties is where the head is kept. If the bank and the vendor each hold a copy of the head, or both anchor it with a third party, neither can rewrite history without the other noticing.

ZizkaDB implements this per agent, with SHA-256 checksums, a chain verification route and export. It is open source and runs self hosted in one Docker container, with a managed Cloud edition at db.zizka.ai.

The design for Meridian and Lumen

Where it runs. Meridian runs the ZizkaDB instance, inside its own environment, so the record is in the bank's custody and the bank can answer a regulator without asking permission. Lumen's agent writes to it using a write-scoped key. The bank issues the key and can revoke it. Lumen cannot read other records or alter earlier ones.

What is recorded. One chain of linked events per application:

application received, with a reference to the application, not a copy of the whole file
data retrieved: bureau entry reference, statement digest and the date of each source
policy and model versions: prompt, policy file and model identifiers
features and rules applied, in terms the bank defines
recommendation and the stated factors
human review where it occurs: reviewer, what was shown, action and time
notice sent: the reason code and text given to the customer
python
app = await db.log(agent="lumen-credit", event="application_received",
data={"app": "LN-20931", "product": "personal_loan", "channel": "web"})

src = await db.log(agent="lumen-credit", event="data_retrieved",
data={"bureau_ref": "B-7712", "bureau_digest": "", "as_of": "2026-03-02",
"statements_digest": ""},
parent_id=app.id)

cfg = await db.log(agent="lumen-credit", event="versions_in_force",
data={"prompt": "v31", "policy": "retail-2026-02", "model": "provider-model-2026-01"},
parent_id=src.id)

rec = await db.log(agent="lumen-credit", event="recommendation",
data={"outcome": "decline", "factors": ["bureau delinquency flag", "debt to income above policy limit"]},
parent_id=cfg.id)

rev = await db.log(agent="meridian-underwriting", event="human_review",
data={"reviewer": "u-118", "shown": ["factors", "bureau_summary"], "action": "upheld"},
parent_id=rec.id)

Protecting what must be protected. Store digests and references for sensitive documents, apply redaction before storage, and keep proprietary prompts as version identifiers and hashes. Lumen can show that a given prompt version was live, and prove later that the prompt it discloses matches the one used, without placing the prompt in the bank's database. The bank gets a verifiable link, and Lumen keeps its IP.

Who anchors the head. On a schedule, record the chain head with both parties. A simple version: the bank emails and stores a signed head in its records system each day, and Lumen stores its own copy. A stronger version adds a neutral third party, such as an escrow or a notary service, that holds the heads. Take advice on which is appropriate.

python
head = await db.verify_chain(agent="lumen-credit")

store head.hash in two separate systems, one controlled by each party

What happens when the claim arrives

Back to Ms Alvarez. Nine months later the bank's counsel asks for the file.

Run the lineage. One why() query from the notice back through the review, the recommendation, the versions and the data sources.
Check the specific allegations. The bureau reference shows which entry was used and as of what date. The recorded features show whether postcode was among them. If it was, the bank needs to know now and not at trial.
Check the human review. The event shows what the underwriter saw and what they did, and how long they spent.
Compare the notice to the cause. Do the factors recorded at decision time match the reason in the notice?
Verify the chain. Run chain verification and compare the head with the copies each party stored. A match supports the claim that the record is the one written at the time.
Scope the pattern. The impact route lists every decision that used the same bureau entry or policy version, which answers the regulator's second question.
Export for counsel and experts. A defined slice, with the verification result.
python
chain = await db.why(notice.id)
affected = await db.impact(src.id)
export = await db.export_events(agent="lumen-credit", since="2026-03-01", until="2026-03-31")

For the vendor, the same record answers the contract dispute. It shows which version ran, which bank overrides were applied and whether a change on either side preceded the outcome. If a defect is found, the impact route scopes it. If the bank altered a threshold, that too is in the chain, and neither party can later claim otherwise without the chain breaking.

What this does and does not prove

Be precise, because opposing counsel will be.

It proves the record has not been altered since the head was stored. That addresses the authenticity attack.
It does not prove the record was complete. If an event was never logged, the chain has no gap to show. Instrumentation has to be designed and tested, and ideally reviewed by someone independent.
It does not prove the decision was right or lawful. It supports the explanation. Counsel and the regulator judge sufficiency.
It does not show why a model produced an output. Stated factors are the agent's account. Rely on the recorded inputs and rules, and consider designs where the decisive step is an explicit rule or a human check.
It does not establish time on its own. A hash chain shows order. External anchoring of the head, such as the stored copies, supports when the record existed.
Admissibility is a legal question. Ask counsel how a record of this kind is treated in your court and by your regulator.
The open source edition records one agent per install. Multi-agent or multi-tenant setups, including a vendor serving several banks, use the Cloud edition or separate instances.
A four week plan

Week 1: agree the event list, what is stored as a digest, retention and who holds which key. Week 2: instrument the vendor and bank events. Week 3: anchor the head in two systems and test an export. Week 4: rehearse with five past declines and someone outside both teams playing the regulator.

ZizkaDB is an open source causal audit database for AI agents. It records decisions with parent links, answers why(), scopes impact, supports replay, drift baselines and export, and shows whether the stored history has been altered through a SHA-256 hash chain. It runs self hosted in a single Docker container, so a bank can keep the record in its own environment.

If you are a bank or a vertical AI company selling to banks, pick one lending flow, record it end to end for a month, and run the rehearsal. The first time a regulator asks what really happened, the answer will be one you can verify.

Corrections: if you represent a party mentioned here and believe a statement is inaccurate, contact us and we will review it promptly.

Sources: Court of Justice of the EU, judgment in Case C-203/22 Dun & Bradstreet Austria and press release 22/25; Directive (EU) 2023/2225 and commentary from KPMG, Skadden and Loyens & Loeff; EU AI Act Annex III and Article 26 (AI Act Service Desk, artificialintelligenceact.eu); EBA letter on the AI Act mapping exercise; CFPB Circulars 2022-03 and 2023-03; American Bar Association Business Law Today on adverse action notices and AI; ZizkaDB documentation.