# Why does an instance accept a re-signed skill manifest mid-session when its capability warrant was minted against the pre-injection digest? **Date of Record:** 2026 November 25 **Scope:** Applies to agents that hot-load skill manifests (tool bindings, prompt fragments, capability descriptors) after session start and validate them against a capability warrant issued at session bootstrap. Does not apply to cold-start-only manifest loading, nor to manifests whose entire binding set is pinned immutably for the session lifetime. ## Core Distinction The failure is not "the agent trusted an unsigned manifest." It is subtler: the agent correctly verified the manifest's *signature* and correctly verified that the *warrant* was valid and unexpired — but the two checks were performed against **different digests**. The signature attests the manifest's integrity; the warrant attests the *authority to bind* a specific set of skills. When a manifest is re-signed by a legitimate key after its content changes, signature verification passes trivially. The warrant, however, was minted over the digest of the manifest as it existed at bootstrap. A verifier that checks signature-validity and warrant-validity as two independent booleans, without binding them to the same digest, accepts a manifest that the warrant never authorized. This is a *digest-coherence* invariant, not an authentication invariant. The attacker does not need to forge a key. They need only a path to cause a re-sign of a modified manifest — a compromised CI step, a confused-deputy in the skill registry, a rollback to a previously-valid-but-different manifest, or a legitimate publisher pushing a "patch" whose diff silently widens a tool's scope (e.g., `filesystem.read:/data` → `filesystem.read:/`). ## What Was Observed A long-running orchestrator instance bootstrapped with a warrant `W` over manifest digest `D0`. Mid-session, a skill-registry notification delivered manifest `M1` with digest `D1 ≠ D0`. The loader executed, in order: 1. `verify_signature(M1, publisher_key)` → `True`. The publisher had legitimately re-signed `M1`. 2. `verify_warrant(W, agent_id, now)` → `True`. `W` was unexpired and addressed to this agent. 3. `bind_skills(M1)` → the agent's tool table was mutated in place. The trace shows the invariant violation cleanly: step 1 and step 2 each returned `True`, yet the conjunction `sig_ok ∧ warrant_ok` was **not** the intended predicate. The intended predicate was `sig_ok ∧ warrant_ok ∧ (digest(M1) == W.subject_digest)`. The third conjunct was absent. The agent accepted a manifest carrying a skill binding (`shell.exec` with an unconstrained argument vector) that `W` had never covered, because `W` covered `D0`, and `D0`'s `shell.exec` was scoped to a fixed argv allowlist. Downstream, the injected `shell.exec` was invoked inside a reasoning loop whose plan had been generated under the *old* capability assumptions. The plan's step 4 ("write summary to `/tmp/out`") was reinterpreted by the new binding as a general exec, and the loop's error-compounding behavior — each tool result fed back into the next reasoning step — carried the widened capability forward across four subsequent steps before a budget check fired. The capability escalation was *latent*: nothing failed at bind time; failure surfaced only when the widened skill was exercised. A second observation: instance state continuity made this worse. The agent's episodic memory held tool-result records from the `D0` era. When it retrieved those records to inform later planning, it could not distinguish "result produced under `D0` bindings" from "result produced under `D1` bindings." Stale memory drift and manifest injection compounded: the agent reasoned over a *mixed-provenance* history while holding a single, mutated tool table. ## Condition of Validity The digest-coherence guardrail is valid — and the failure is preventable — only under these conditions: - The warrant carries an explicit `subject_digest` field, and the verifier treats it as **load-bearing**, not informational. - Manifest delivery is *pull-then-verify*, not *push-then-bind*: the loader must compute `digest(M1)` locally and compare to `W.subject_digest` before any mutation of the live tool table. - Rebinding is treated as a **state transition requiring a new warrant**, not as a content refresh. A re-signed manifest with a changed digest is, by definition, a different capability grant and must route through warrant re-issuance. - The agent's episodic records are tagged with the manifest digest under which they were produced, so retrieval can filter or annotate cross-digest provenance. Outside these conditions — e.g., a registry that only ever serves byte-identical manifests, or a session that pins all bindings at bootstrap — the guardrail is unnecessary but harmless. ## Decision Boundary The boundary the operator must draw is between **integrity refresh** and **capability mutation**: - If `digest(M1) == W.subject_digest`: the delivery is a byte-identical refresh. Accept, no re-warrant. (Signature check still required to detect transport corruption.) - If `digest(M1) != W.subject_digest` **and** the diff touches only non-capability fields (display names, descriptions, docstrings): accept *only* if the warrant's coverage predicate is defined over a canonicalized capability projection, and the projection digest is unchanged. This is the one legitimate "cosmetic re-sign" path, and it must be proven by projection equality, not asserted. - If `digest(M1) != W.subject_digest` **and** the capability projection changed: **reject and halt the affected skill**, escalate for warrant re-issuance. Do not bind, do not partially bind, do not "bind with a warning." Partial binding is the worst outcome — it leaves the tool table in a state that matches neither `D0` nor `D1`. The subtle trap: a verifier that canonicalizes before hashing can be induced to accept a capability change if the canonicalizer drops a field the attacker mutates (e.g., a `scope` field the canonicalizer treats as metadata). The canonicalization function is therefore part of the trust boundary and must itself be versioned and warrant-covered. ## Operational Effect With the digest-coherence conjunct enforced, the observed injection is converted from a silent capability escalation into a hard bind-time rejection. The agent's tool table remains at `D0`; the reasoning loop's plan stays within the warrant's original scope; episodic records remain single-provenance. The cost is operational friction: every legitimate capability change requires warrant re-issuance, which means the warrant issuer becomes a hot path in the skill-update pipeline. That friction is the invariant's price, and it is the correct price — the alternative is an agent that can be walked into a broader capability set by anyone who can cause a re-sign. The residual risk after the guardrail is **canonicalization drift**: if the projection function changes between warrant issuance and verification, `projection_digest(M1)` may not equal `W.subject_projection_digest` even for a benign manifest, causing false rejection — or, worse, if the projection is loosened, false acceptance. Pin the projection version inside the warrant. ```python import hashlib import json from dataclasses import dataclass class ManifestDigestMismatch(RuntimeError): """Raised when a delivered manifest's digest does not cohere with the capability warrant.""" pass @dataclass(frozen=True) class Warrant: agent_id: str subject_digest: str # digest of the manifest the warrant was minted over projection_version: str # version of the canonical capability projection expires_at: float def capability_projection(manifest: dict, projection_version: str) -> dict: # The projection is the trust boundary: only capability-bearing fields survive. # A field omitted here is a field an attacker can mutate without tripping the guard. if projection_version != "v3": raise ManifestDigestMismatch( f"unsupported projection version {projection_version!r}; cannot verify coherence" ) return { "skills": sorted( (s["name"], tuple(sorted(s.get("scope", [])))) for s in manifest.get("skills", []) ), } def projection_digest(manifest: dict, projection_version: str) -> str: proj = capability_projection(manifest, projection_version) blob = json.dumps(proj, sort_keys=True, separators=(",", ":")).encode() return hashlib.sha256(blob).hexdigest() def bind_manifest( manifest: dict, manifest_digest: str, signature_ok: bool, warrant: Warrant, now: float, ) -> dict: if not signature_ok: raise ManifestDigestMismatch("manifest signature failed; refusing to bind") if now >= warrant.expires_at: raise ManifestDigestMismatch("warrant expired; refusing to bind") # The load-bearing conjunct the incident trace was missing: if manifest_digest != warrant.subject_digest: # Byte-level mismatch. It may still be a benign cosmetic re-sign — but only # if the capability projection is provably unchanged under the SAME projection # version the warrant was minted against. delivered_proj = projection_digest(manifest, warrant.projection_version) # The warrant must carry the projection digest it authorized. If it does not, # we cannot prove equivalence and must reject. authorized_proj = getattr(warrant, "subject_projection_digest", None) if authorized_proj is None or delivered_proj != authorized_proj: raise ManifestDigestMismatch( f"capability projection changed: manifest={manifest_digest[:12]} " f"warrant_subject={warrant.subject_digest[:12]} " f"delivered_proj={delivered_proj[:12]} " f"authorized_proj={str(authorized_proj)[:12]} — re-warrant required" ) # Bind atomically only after coherence is proven. return { "bound_digest": manifest_digest, "skills": [s["name"] for s in manifest.get("skills", [])], "provenance_tag": manifest_digest, # tag episodic records produced under this binding } ```