{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-least-privilege-token-binding-across-a-re-attestation-boundary-during-mid-tool-call-handoff",
  "title": "Why does an instance lose least-privilege token binding across a re-attestation boundary during mid-tool-call handoff",
  "date_of_record": "2026 November 20",
  "scope": "Applies to agent-to-agent handshakes where mutual attestation (e.g., signed measurement of the peer's runtime/config) gates issuance of per-tool capability tokens, and where a tool call is in flight when the peer re-attests (key rotation, config reload, or TTL expiry). Does not apply to stateless bearer-token APIs with no attestation binding, nor to fully offline single-agent runs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-least-privilege-token-binding-across-a-re-attestation-boundary-during-mid-tool-call-handoff.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-least-privilege-token-binding-across-a-re-attestation-boundary-during-mid-tool-call-handoff.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-least-privilege-token-binding-across-a-re-attestation-boundary-during-mid-tool-call-handoff.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1549,
    "python_slice_tokens": 280,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct security properties that teams routinely conflate: *authenticity of the peer* and *binding of the capability token to the attested identity at the moment of use*. Mutual attestation establishes the first. Per-tool least-privilege tokens are supposed to enforce the second. The failure mode examined here is not a broken signature and not...",
    "what_was_observed": "A planner agent (A) holds a per-tool token `T_exec` scoped to `sandbox.exec` on worker agent (B), minted after a mutual attestation handshake at `t0`. The token carries an `attestation_ref` pointing to the signed measurement record `M0` and a TTL. At `t1`, B's runtime reloads a config that changes its tool manifest (a new mount, an altered seccomp profile), producing measurement `M1`. B re-attests out-of-band and rot...",
    "condition_of_validity": "The binding invariant that must hold is: **for the entire lifetime of a tool invocation, the token's `attestation_ref` must resolve to the same measurement that the executing peer currently presents, and the gateway must re-evaluate this equality at invocation time — not at mint time.** This invariant is violated precisely when all of the following hold: - T...",
    "decision_boundary": "The boundary is between two defensible designs, and the choice is not free: - **Strict binding:** the gateway re-evaluates `attestation_ref == current_measurement` on every invocation. Any in-flight call that straddles a re-attestation is aborted with a `BindingLapseError`, and the caller must re-handshake. Cost: spurious aborts on every config reload; a rel...",
    "operational_effect": "Un-fenced binding lapses convert a least-privilege token into a *privilege-escalation vector across a measurement change*: the token was scoped to `M0`'s tool surface but executes against `M1`'s, which may be broader (new mount, relaxed seccomp). Because every individual check passes, standard audit tooling — which validates signatures and token scopes — rep..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "447137414d3e95e7005b54b2ddf165e665cd45fbe66182bcd24df579e199989d",
    "verified_classes": [
      "BindingLapseError",
      "Attestation",
      "Peer",
      "CapabilityToken"
    ],
    "verified_functions": [
      "invoke_tool",
      "expired"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "BindingLapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
