# Under what conditions must an instance treat a per-call MCP consent grant as non-transferable across tool-call retries, and how does the audit-trail attestation break when it does not? **Date of Record:** 2026 November 26 **Scope:** Applies to MCP client runtimes that gate each `tools/call` on an explicit per-call consent decision (human-in-the-loop approval, policy-engine verdict, or signed capability token) and emit an audit attestation per call. Does not apply to session-scoped blanket grants, nor to tool servers that enforce authorization internally independent of the client's consent layer. ## Core Distinction A per-call consent grant is a *decision bound to a specific call identity* — a tuple of (tool name, canonicalized arguments, consenting principal, decision nonce, expiry). It is not a *permission to invoke a tool*. The distinction matters because agent runtimes retry, re-plan, and re-issue tool calls under conditions that look semantically identical to the model but are structurally distinct to the authorization layer: a retry after a transport timeout, a re-plan after a schema mismatch, a fan-out across parallel sub-agents, and a "corrected" re-invocation with normalized arguments are all *different calls* that happen to share a tool name and intent. The invariant that fails in the field is this: **consent must be re-evaluated (or explicitly re-bound) at every call-identity change, and the audit attestation must record the consent decision that actually authorized the executed call — not the decision that authorized an earlier, failed attempt.** When a runtime treats a prior consent grant as a reusable capability, two things break simultaneously: the authorization boundary widens silently (a grant for `write_file(path="/tmp/x")` gets reused for `write_file(path="/etc/x")` after an argument-normalization retry), and the audit trail attests to a decision that never covered the executed call, producing a *false attestation* — an audit record that is internally consistent but factually wrong about what was authorized. ## What Was Observed A research agent using an MCP filesystem server was asked to summarize a dataset and stage a cleaned copy. The consent layer was configured for per-call human approval on `write_file`. The trace: 1. **Call A** — `write_file(path="/data/staging/clean.csv", content=...)`. Consent requested; approver grants with nonce `n1`, bound to `sha256(tool + canonical_args)`. Server returns HTTP 503 (transient backend saturation). Client runtime marks the call *retryable*. 2. **Retry loop** — Runtime's retry wrapper re-issues the call. During re-serialization, the JSON argument map is re-emitted with keys sorted and the content field re-encoded (trailing newline normalization applied by the runtime's content middleware). The resulting `canonical_args` hash differs from the consent binding by one byte. The retry wrapper — implemented as "reuse the consent handle on the in-flight call" — does **not** re-request consent, because it keys the consent cache on `(tool_name, call_id)` rather than on the argument hash. 3. **Call A′** — `write_file(path="/data/staging/clean.csv", content=...\n)`. Executes. Returns 200. Audit record emitted with `consent_nonce=n1`, `attestation="authorized"`. 4. **Re-plan** — Agent's verifier notices the staged file's checksum doesn't match its expectation (the newline changed the hash) and re-plans: "the write must have targeted the wrong path; retry with the absolute resolved path." It issues **Call B** — `write_file(path="/data/staging/clean.csv", ...)` but this time the planner has *resolved* a symlink and the path canonicalizes to `/data/staging/../staging/clean.csv`. 5. **Call B executes without consent.** The runtime's consent cache keyed on `(tool_name, call_id)` — and the re-plan reused the same logical `call_id` because the agent framework treated it as "the same step, retried." No consent prompt fired. Audit record emitted with `consent_nonce=n1` again, `attestation="authorized"`, but the executed call's argument hash does not match anything `n1` was ever bound to. The failure is not that consent was bypassed by an attacker. It is that **the consent cache's key was coarser than the consent binding's scope**, and the retry/re-plan machinery — which is designed to be *transparent* to the model — was also transparent to the authorization layer. The model never saw a boundary; neither did the audit log. ## Condition of Validity The per-call consent model is sound only when all three of the following hold: - **Binding completeness.** The consent decision is cryptographically or structurally bound to `H(tool_name ‖ canonicalize(args) ‖ principal ‖ nonce ‖ expiry)`, where `canonicalize` is deterministic and *identical* on the consent path and the execution path. If the runtime re-serializes arguments between consent and execution (key sorting, unicode normalization, content middleware, path resolution), the binding is broken unless canonicalization is applied *before* hashing on both sides. - **Cache-key equality with binding scope.** Any consent-reuse cache must be keyed on the full binding hash, never on `(tool_name, call_id)` or `(tool_name, step_id)`. A retry with byte-identical canonical args may reuse the grant; a retry with any argument delta, path resolution, or content mutation must be a cache miss and trigger re-consent. - **Attestation faithfulness.** The audit record must embed the binding hash of the *executed* call and the consent nonce, and a verifier must be able to recompute `H(executed_args)` and confirm it equals the value the nonce was issued against. An attestation that records only `consent_nonce` and `"authorized"` is unfalsifiable and therefore worthless as an audit artifact. When any of these fails, the system is in a state where *the audit trail is more confident than the authorization layer*. That is the specific hazard: the log says "approved," the approver approved something, but not the thing that ran. ## Decision Boundary The operational question an instance must resolve at each tool-call boundary is binary and must be answered *before* dispatch, not after: > **Is the canonical argument hash of the call I am about to execute byte-identical to the hash the consent nonce was issued against, under the same canonicalization function, within the nonce's expiry, for the same principal?** - If **yes** → reuse the grant, dispatch, attest with `(nonce, H(args))`. - If **no** → the grant does not cover this call. Either (a) request fresh consent bound to the new hash, or (b) if the delta is a runtime-induced normalization the approver could not have anticipated, *fail closed* and surface the normalization to the approver rather than silently re-binding. The boundary is crossed the moment the runtime performs any transformation between consent and dispatch — retry re-serialization, path canonicalization, content middleware, argument defaulting, or sub-agent handoff where the receiving agent reconstructs the call from a summary rather than the original bytes. Each of these is a *call-identity mutation* and must invalidate the cache. A corollary the field keeps getting wrong: **a retry is not a re-execution of the consented call; it is a new call that must prove it is the consented call.** Transparent retry is a transport concern; it must not be transparent to authorization. ## Operational Effect Concretely, an instance that does not enforce the boundary exhibits three measurable degradations: 1. **Silent scope widening.** Consent granted for a narrow argument set is reused across argument drift, so the effective authorization surface is the union of all retries' arguments — typically much larger than what the approver saw. In the trace above, the approver believed they authorized one write to one path; the runtime authorized an unbounded family of writes sharing a `call_id`. 2. **False attestation.** Audit records claim `authorized` with a nonce that does not hash-match the executed arguments. Downstream auditors, replay verifiers, and incident responders who trust the log will reconstruct an authorization history that never happened. This is worse than no log, because it is *plausible*. 3. **Unbounded retry amplification under rate governance.** Because consent is cached per `call_id`, a retry storm (e.g., a flaky server returning 503 on a consented call) can execute the tool hundreds of times under a single consent grant, defeating per-call rate limits that were designed assuming one consent = one execution. The rate governor sees N executions against 1 grant and either under-counts (if it meters on grants) or blocks legitimate re-consent (if it meters on calls but the cache suppresses the consent events it meters on). The guardrail is a **consent-dispatch invariant enforced at the dispatch chokepoint**: recompute the canonical hash immediately before execution, compare to the nonce's bound hash, and raise on mismatch rather than falling through to a cached grant. The audit emitter must write the executed hash, not the intended one, and must be on the same code path as the dispatch — not a parallel logging sidecar that can drift. ```python import hashlib import json from dataclasses import dataclass from typing import Any class ConsentBindingMismatch(RuntimeError): """Raised when a dispatched MCP tool call does not match the consent grant it claims.""" class ConsentExpired(ConsentBindingMismatch): """Raised when a consent nonce is past its expiry at dispatch time.""" def canonicalize(tool: str, args: dict[str, Any]) -> str: # Deterministic: sorted keys, no whitespace, UTF-8, no trailing normalization. # MUST be the identical function used on the consent path. payload = json.dumps( {"tool": tool, "args": args}, sort_keys=True, separators=(",", ":"), ensure_ascii=False, ) return hashlib.sha256(payload.encode("utf-8")).hexdigest() @dataclass(frozen=True) class ConsentGrant: nonce: str principal: str bound_hash: str # hash of (tool, canonical_args) at consent time expires_at: float # epoch seconds @dataclass(frozen=True) class ToolCall: call_id: str # logical step id; NOT a consent key tool: str args: dict[str, Any] def dispatch_with_consent( call: ToolCall, grant: ConsentGrant | None, now: float, ) -> str: """Dispatch an MCP tool call only if a grant is bound to its exact canonical args.""" if grant is None: raise ConsentBindingMismatch( f"no consent grant for tool={call.tool!r} call_id={call.call_id!r}" ) if now >= grant.expires_at: raise ConsentExpired( f"consent nonce={grant.nonce!r} expired at {grant.expires_at}; " f"call_id={call.call_id!r} requires re-consent" ) executed_hash = canonicalize(call.tool, call.args) if executed_hash != grant.bound_hash: # This is the boundary. A retry, re-plan, path-resolution, or content # middleware changed the call identity. The cached grant does NOT cover it. raise ConsentBindingMismatch( f"consent nonce={grant.nonce!r} bound to {grant.bound_hash[:12]}… " f"but executed call hashes to {executed_hash[:12]}…; " f"call_id={call.call_id!r} tool={call.tool!r} must re-consent" ) # Attestation and dispatch share this code path so the log cannot drift. attestation = { "call_id": call.call_id, "tool": call.tool, "executed_hash": executed_hash, "consent_nonce": grant.nonce, "principal": grant.principal, "verdict": "authorized", } _emit_audit(attestation) return _execute(call) def _emit_audit(record: dict[str, Any]) -> None: # Real implementation writes to an append-only, hash-chained sink. ... def _execute(call: ToolCall) -> str: ... return "ok" ```