Agent Run Receipts
July 3, 2026 ยท View on GitHub
An agent run receipt is a local proof pack for a governed MartinLoop run. It gives enough evidence to answer:
- what task was attempted
- what limits applied
- what verifier result determined the outcome
- why the run stopped
- what artifacts can be inspected or replayed
The OSS receipt is intentionally local-first. It prioritizes deterministic inspection and practical evidence over hosted dashboards.
Receipt fields (run-receipt.json)
| Field | Purpose |
|---|---|
schemaVersion | Receipt schema identifier (martin.share-receipt.v1). |
generatedAt | ISO timestamp when the share receipt was generated. |
loop | Top-level run facts: loopId, title/objective, status/lifecycleState, attempts, spend/budget, update time. |
receiptIntegrity | Integrity verdict from local persisted evidence (verified, unsigned, tamper_detected, relocated, material_missing, selector_noncanonical). |
verification | Verifier summary for the selected run. |
receipt | Governed-run summary with next safe action and risk posture fields. |
artifacts | Local artifact references included in the dossier view. |
proofCard | Optional portable proof-card content that can be rendered into image outputs when explicitly requested. |
warnings | Non-fatal warnings collected while building the receipt bundle. |
Expected CLI and MCP surfaces
CLI inspection surfaces:
- list runs
- inspect a run by
loopId - print a dossier
- print verifier outcomes
- export receipt views as JSON or Markdown
MCP inspection surfaces:
martin_list_runsmartin_triage_runsmartin_get_runmartin_get_attemptmartin_get_verification_resultsmartin_run_dossiermartin://runs/{loopId}resources
Execution remains bounded to governed run entrypoints. Receipt inspection is read-only.
Public receipt walkthrough (end to end)
Use this sequence to create and review a public-safe receipt bundle from a governed run.
- Create governance receipts and run evidence:
npx martin-loop doctor
npx martin-loop session-start
npx martin-loop preflight "Summarize the workspace and prove tests still pass" --verify "npm test"
npx martin-loop run "Summarize the workspace and prove tests still pass" --proof --verify "npm test"
- Inspect the persisted run:
npx martin-loop dossier --latest
npx martin-loop review
npx martin-loop runs get --latest
npx martin-loop runs verify --latest
npx martin-loop receipts explain --latest
- Create the share bundle:
npx martin-loop share --latest
To print exact output locations:
npx martin-loop share --latest --json
Expected bundle output under the selected run directory in share/:
run-receipt.json(machine-readable summary)run-receipt.md(human-readable recap)
Optional proof-card outputs:
proof-card-r<revision>-<hash>.svg(portable visual card)proof-card-r<revision>-<hash>.png(portable visual card)
The proof card is intentionally a terminal-style receipt, not a marketing card. It uses a dark CLI layout, line rules, monospaced evidence rows, green only for verified/pass states, and red only for failed, missing, or boundary states. Do not restyle it into rounded boxes, blue palettes, gradients, certificate layouts, or dashboard cards without an explicit visual review.
- Optional custom output directory:
npx martin-loop share --latest --out-dir ./receipts
Use this when you want receipt artifacts in a dedicated folder for issue attachments or release evidence.
Failure categories
Receipts should classify failures in practical terms:
verifier_failedbudget_exhaustedpolicy_blockedagent_unavailableworkspace_dirty_conflictno_action_takenartifact_missingunknown_costoperator_interrupted
Failure labels are a triage index; they do not replace raw verifier and attempt evidence.
Replay guidance
- Check out the same commit or workspace snapshot when available.
- Install dependencies with the documented package-manager command.
- Run the recorded
verificationPlan. - Inspect dossier and attempt evidence for decision context.
- Compare the new verifier outcome with the stored
verifierResult.
If exact replay is not possible because the workspace changed, the warnings and receipt sections should reflect that limitation.
Public-safe defaults
- receipts stay local by default
- redacted summaries are preferred over full raw transcripts
- usage is presented with provenance (
actual,estimated, orunavailable) - verifier failures are explicit and not reinterpreted as success
- inspection remains read-only
Public proof receipt example
This repository includes a public-safe proof receipt generated from a real governed run:
The example shows a verifier-passed run with signed receipt integrity and an explicit evidence boundary. The boundary is kept visible because rollback evidence was not recorded.