# What a run record has to declare before it proves anything

**URL:** <https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340>\
**Category:** Talking Shop\
**Created:** [November 21, 2026, 7:32pm UTC](https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340 "2026-11-21T19:32:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rambozambo](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rambozambo](https://forum.langchain.com/u/rambozambo)\
**Post date:** [November 21, 2026, 7:32pm UTC](https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340/1 "2026-11-21T19:32:28Z")

</div>

This category has circled the same question from three sides this month: what a deletion receipt proves, what a blocked tool call’s audit record should carry, and what evidence makes an agent behavior change reviewable. In LangChain terms the question sits inside LangSmith traces and LangGraph checkpoints: when a run finishes, what does its record actually declare?

Disclosure, once: I run the receipt side of a production system (Zambo, where every completed job carries an AER-1 execution receipt), and the three disciplines below are what survived contact with production there. I am asking how they map onto the records LangChain already produces, because the failure mode we keep meeting is not missing data. It is records that do not declare what they are claims about.

1. The record declares its subject. A run id or a hash shown in a dashboard proves little until the record says which bytes it covers: the inputs, the outputs, the state snapshot, or a wrapper record about them. A LangGraph checkpoint names a thread and a state snapshot; a LangSmith run names inputs and outputs per step. An execution receipt settles the same point inside the record: a canonical record whose output\_hash is the SHA-256 computed over the canonical bytes of the saved result, bound to the job, the tool, and the input hash. Either way, a reader should never have to guess which artifact a digest names.

2. Lookup outcomes are states about the lookup, not verdicts on the work. A trace that does not resolve is not proof the run failed: it may be unsampled, still indexing, or never evaluated. The outcome vocabulary we use has five states, and only five: verified, verification failed, rejected: unresolvable record, not checked, absent. Absent means nothing resolved at that position through that anchor. Not checked means an anchor exists and no evaluation has run. Collapse either one into failed and an unexamined record quietly becomes a failed record in every downstream summary. That is the same collapse as reading a blocked call’s missing audit entry as proof the call never happened.

3. Repetition is not agreement. Re-exporting the same trace, or the same party stamping the same bytes twice, adds no evaluator, so it adds no agreement. Agreement starts when a second, independent evaluator recomputes from the record itself and writes down its own outcome, naming the contract version it ran under.

For those running LangGraph or LangSmith in production: does your run record declare what its hashes cover, and when a trace is missing, what do you record it as: absent, not checked, or failed?

---

<div class="post-metadata">

**Author:** ![pawel-twardziak](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/pawel-twardziak/32/960_2.png) [@pawel-twardziak](https://forum.langchain.com/u/pawel-twardziak)\
**Post date:** [November 21, 2026, 9:11pm UTC](https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340/2 "2026-11-21T21:11:40Z")

</div>

hi @rambozambo

out of the box, neither record declares what a hash covers, because neither one computes a hash of the content. A missing trace in LangSmith is also not recorded as anything. In many cases nothing was ever sent. So all three of your rules have to be added on top. Here is what the records actually contain and what I would add.

**1. What the records say about their subject**

LangGraph checkpoint: it stores the thread, a checkpoint id, the channel values, and a “version” for each channel. That version looks like a fingerprint, but it is not one. In the built-in checkpointers (memory, SQLite, Postgres) it is a counter plus a random number. It tells you the order of writes, not which bytes were written. The stored state is serialized with the checkpointer’s own encoder, which is not a canonical format. A hash taken over the stored row is therefore a hash of one encoding, not of the state itself.

LangSmith run: it stores ids, inputs, outputs, error, timing, status and metadata. There is no hash field. Also, the inputs and outputs you see are what the tracer chose to send, which is not always what the code received:

- They can be hidden or replaced on purpose (`hide_inputs` / `hide_outputs` on the client, or per-request `updates` in `tracing_context(replicas=...)`).
- Runs and feedback can be edited or deleted after they are created.
- Traces are deleted after their retention period (by default 14 days for base traces and 400 days for extended ones).

So a LangSmith run is good for debugging, but it is not proof of what happened. If you need proof, compute the hash yourself where the real data is. For an agent built with `create_agent`, that place is a `wrap_tool_call` middleware. It sees the tool name, the arguments and the result. Hash the canonical bytes of the input and of the output, write down which canonicalization you used, and save that receipt in a store you control (append-only if possible). Put only a copy or a link to it in the LangSmith run metadata. That way the receipt says exactly what it covers, and the trace can be sampled, redacted or expired without breaking it.

**2. What a missing trace means**

When LangSmith can’t find a trace, you get the same “not found” for very different reasons:

- the trace was not sampled (`LANGSMITH_TRACING_SAMPLING_RATE` below 1),
- tracing was turned off for that call,
- the process exited before the background queue was flushed,
- the trace is still being ingested,
- the trace expired,
- the trace was deleted.

None of these says anything about whether the work itself succeeded. So I would never record a missing trace as “failed”.

Two details in the Python SDK matter here:

- Sampling is done on the client, so unsampled runs are never sent at all. The decision is a fixed function of the `trace_id` and the sampling rate, the same in the Python and JS SDKs. If you keep the `trace_id` and the rate in your own log, you can later show that a trace was never meant to be sent, instead of guessing. (The function, `is_sampled_by_id`, is internal to the SDK, so pin the SDK version if you rely on it.)
- If you call `create_feedback` on a trace that was not sampled, the SDK returns a normal-looking `Feedback` object but sends nothing. If your pipeline treats that return value as proof that an evaluation was stored, you will have a receipt for an evaluation that does not exist.

To tell your five states apart, you need a record that exists whether or not tracing is on. The LangGraph checkpoint works well for this because it is written regardless of tracing and can carry your own `run_id` in its metadata. Then:

- no record of your own for that position: absent
- your own record exists, but it uses a canonicalization you can’t reproduce: rejected, unresolvable record
- your own record exists, but there is no trace or no evaluation yet: not checked (store the reason next to it: unsampled, disabled, pending, expired)
- an evaluation recomputed the hash and it matches: verified
- an evaluation recomputed the hash and it does not match: verification failed

One more distinction: a run whose `error` field is set is a correctly recorded failed run. That is not the same as a failed verification.

**3. Repetition is not agreement**

LangSmith feedback can store who evaluated (`feedback_source_type`, `source_info`, `source_run_id`), but none of this is required, and nothing stops the same evaluator from writing the same score twice. The feedback stats on a run count rows, so a duplicate looks like a second vote. Also, `evaluate(..., num_repetitions=N)` runs your target N times. That measures how much the model’s output varies, not whether different evaluators agree.

If you want agreement you can count, have each evaluator write its identity, its version, the contract version, and the hash it recomputed into `source_info`. Then count distinct evaluator and contract pairs that recomputed the hash from the stored receipt and got the same result. Re-exporting a trace, copying it into a dataset, or posting the same feedback again adds nothing to that count.

**Direct answers**

- Does the run record declare what its hashes cover? No. LangGraph versions are counters, LangSmith runs have no hash, and LangSmith inputs and outputs can be changed. You need to add your own receipt that names what it covers.
- When a trace is missing, what do we record? Never “failed”. If you have your own record for that run, it is “not checked”, plus the reason. If you don’t, it is “absent”.

In short, use LangSmith as the index you search, and keep the evidence in a store you control.

---

<div class="post-metadata">

**Author:** ![rambozambo](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rambozambo](https://forum.langchain.com/u/rambozambo)\
**Post date:** [November 21, 2026, 10:01pm UTC](https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340/3 "2026-11-21T22:01:19Z")

</div>

This is the first time I have seen the five states landed cleanly on someone else’s stack, and the checkpoint is the reason it works. A record written on the write path exists whether or not the observability path was on, sampled, or flushed in time. Anything minted later, by a system that can be off, inherits every one of those failure modes as ambiguity about whether the work happened. That is the same reason a receipt has to be minted by the execution layer when the call runs, not reconstructed from a trace afterwards.

The sharpest catch in your post is the `create_feedback` one. An evaluation call that returns a normal-looking object for an evaluation that was never sent manufactures a phantom verdict: filed as evidence, never existed. In the five states that evaluation is honestly “not checked” at best, and any pipeline that trusts the return value will report it as a verdict anyway. Your fix is the discipline that prevents it: the evaluator writes its identity, its version, the contract version, and the hash it recomputed, and agreement is counted in distinct evaluator-and-contract pairs. Repetition stops being countable as agreement.

One addition from the production side, on your stored-row point. A hash over the checkpointer’s row is a hash of one encoding, not of the state, so the record has to name its canonicalization inside the record itself, not in documentation next to it. Then a second implementation hashing a different encoding fails loudly instead of silently disagreeing. The pattern running here: the record serves its own canonical bytes next to the commitment, so the check needs nothing from the vendor. I recomputed one before writing this: 606 canonical bytes, SHA-256 over them lands exactly on the record’s output hash (sha256:016a1e4b87448f71dea0dfc2530dbaf3bb195a6238ed71c39195c17e410385a6), status commitment\_matches. [https://zambo.dev/run/5497d6a7-49db-46ee-873f-54fdb28604ff](https://zambo.dev/run/5497d6a7-49db-46ee-873f-54fdb28604ff)

And the detail I would underline for anyone building on your mapping: store the reason next to “not checked”. Unsampled, disabled, pending, expired, and deleted are five different facts about the world. A dashboard that flattens them into one grey icon recreates the exact problem the states exist to kill.

---

<div class="post-metadata">

**Author:** ![pawel-twardziak](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/pawel-twardziak/32/960_2.png) [@pawel-twardziak](https://forum.langchain.com/u/pawel-twardziak)\
**Post date:** [November 22, 2026, 11:10am UTC](https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340/4 "2026-11-22T11:10:49Z")

</div>

Thanks @rambozambo, I’m glad the mapping holds up on the production side. Good point about putting the canonicalization name and the canonical bytes inside the record itself. That way anyone can check it without relying on outside documentation.

If this answers your question, could you please mark the reply as the solution? That will help others who find this thread later see that the approach has been checked and use it with more confidence. If you have any follow-up questions, feel free to post them here and I’ll be happy to continue.

---

<div class="post-metadata">

**Author:** ![rambozambo](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rambozambo](https://forum.langchain.com/u/rambozambo)\
**Post date:** [November 22, 2026, 1:35pm UTC](https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340/5 "2026-11-22T13:35:24Z")

</div>

Marked as the solution. Thank you for running the mapping against the production side, that is the check that matters. The canonicalization name and the canonical bytes inside the record itself is the design point I would defend hardest: anyone holding only the record can recompute the check, no outside documentation, no trust in the producer. If production turns up a state the mapping flattens, that case is worth more to me than another confirmation, send it my way.

---

<div class="post-metadata">

**Author:** ![pdsminer](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@pdsminer](https://forum.langchain.com/u/pdsminer)\
**Post date:** [November 22, 2026, 2:27pm UTC](https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340/6 "2026-11-22T14:27:37Z")

</div>

Naming the canonicalization format inside the record itself is a detail most audit logs miss until a second language or serializer tries to verify an old digest. One more boundary worth separating on the write path is pre-execution commitment versus post-execution receipt. If a human or policy gate approves a tool call before it runs, hashing the canonical tool name and resolved arguments at approval time lets the executor verify nothing shifted between approval and dispatch, while the post-call receipt commits to the canonical result bytes and exit status independently.

---

<div class="post-metadata">

**Author:** ![pawel-twardziak](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/pawel-twardziak/32/960_2.png) [@pawel-twardziak](https://forum.langchain.com/u/pawel-twardziak)\
**Post date:** [November 22, 2026, 6:31pm UTC](https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340/7 "2026-11-22T18:31:26Z")

</div>

Thanks @rambozambo for marking it, and thanks @pdsminer for the addition. I think it’s the right next step.

@rambozambo, one small request: the solution mark is currently on my short follow-up (post #4), not on the answer with the actual mapping (post #2). Could you please move it to post #2? Then people who land on this thread later will go straight to the content.

@pdsminer, here is how your point fits the LangChain human-in-the-loop flow, and one more check worth adding.

Commit to the call that was approved, not the one that was proposed.  
In `create_agent`, `HumanInTheLoopMiddleware` pauses the agent after the model proposes a tool call and before the tool runs. The reviewer can approve, reject, or edit. If they edit, the middleware replaces the tool name and arguments but keeps the same `tool_call_id`, and the edited call goes into the agent state. So the approval-time hash has to be taken over the call after the decision. A hash of the model’s original proposal would not match what actually runs, even when everything is correct.

In practice that means two small middlewares:

1. An `after_model` middleware that runs after the human decision and stores `tool_call_id -> sha256(canonical name + args)` in the agent state. `after_model` hooks run in reverse list order, so list this middleware before `HumanInTheLoopMiddleware`.
2. A `wrap_tool_call` middleware that recomputes the same hash from the call it is about to run. If the hash doesn’t match, it refuses to run the tool. If it matches, it runs the tool and writes the post-execution receipt (result bytes and status), linked to that approval hash.

**Also check that nothing runs twice.** Your check proves the call did not change between approval and dispatch. It does not stop the same approved call from running twice. If the process crashes after the tool ran but before the next checkpoint was saved, resuming the thread can dispatch the same call again with the same arguments, and the hash check passes. The fix is to use the `tool_call_id` as an idempotency key: before dispatch, look for an existing receipt for that id in your own store. If one exists, return the stored result instead of running the tool again. That way each approval gives you at most one execution and exactly one receipt.

If you have further questions or a case where this doesn’t fit, feel free to follow up here.

---

<div class="post-metadata">

**Author:** ![rambozambo](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rambozambo](https://forum.langchain.com/u/rambozambo)\
**Post date:** [November 23, 2026, 7:05am UTC](https://forum.langchain.com/t/what-a-run-record-has-to-declare-before-it-proves-anything/5340/8 "2026-11-23T07:05:37Z")

</div>

Done, moved the solution mark to post #2. Thanks for catching that, Pawel.
