Execution proof

A final answer can carry its own execution proof.

The export names on this page were read from the published @coderifts/agent-guard@17.3.3 on 2026-09-15 — renderFinalAnswerProof, attachProofToAgentResponse, guardToolCall and withCodeRifts are all present in the shipped build.

When a guarded call produces a machine GuardExecutionProof (outcome.proof), the guard can attach a human-readable proof block to the agent’s final answer. It is a signed, structural attestation of the receipt and execution fields the guard has available — with its boundary stated in the block itself.

What the proof carries

The rendered block makes these structural fields visible: the proof spec; preflight and receipt fields (preflighted, decision_id, receipt verification, status, and expiry); currently_authorized; the bound operation and change_fp; and execution fields including verdict kind, attempted, executed, enforced, and execution_result_hash.

Receipt vocabulary: an authorize response may mint a chain_receipt; downstream gates verify it conjunctively. currently_authorized: null is SKIPPED, not a pass. The hosted verify_receipt route, given a token alone, answers currently_authorized null. The open offline verifier prints VERIFIED_CURRENT and has no currently_authorized field.

What it does NOT claim

The proof states its own boundary. These lines are rendered from the proof’s limits:

  • This block does NOT claim the change is safe.
  • This block does NOT claim the host cannot bypass the package.
  • Absent fields are NOT compliance.
  • change_fp is what was CHECKED at preflight — not what the factory applied.
  • Calls outside the guarded path are invisible to this proof.
  • execution_result_hash is NOT proof that applied artifacts match change_fp.
  • conditional_write:true is host-asserted (the host says it conditioned on a version token); it is NOT independently CAS-verified by the guard.
  • commit_observation is observed at T3, not atomic: another writer may act between write and observation; token-only adapters compare version token not content; host attestation is a host claim layered on the measurement

How to verify one

For the public key registry, frozen format pointer, and reference verifier, use Portable Proof of Authorization

How to get it

After guardToolCall / withCodeRifts, render or attach the proof from outcome.proof. A string response appends the block; an object response adds final_answer_proof and final_answer_proof_text.

import { renderFinalAnswerProof, attachProofToAgentResponse } from '@coderifts/agent-guard';

// After guardToolCall / withCodeRifts …
const block = renderFinalAnswerProof(outcome.proof); // markdown string
const answer = attachProofToAgentResponse('I applied the authorized edit.', outcome.proof);
// string → appends block; object → adds final_answer_proof + final_answer_proof_text