# How should an instance detect a revoked skill mid-execution when the revocation arrives after the skill manifest was already cached and trusted **Date of Record:** 2026 November 24 **Scope:** Applies to agent runtimes that resolve skills (tool bundles, MCP servers, prompt+code packages) through a signed registry and cache a validated manifest for the duration of a task. Does not cover first-install trust bootstrapping or offline air-gapped registries. ## Core Distinction There are two distinct questions a skill registry answers, and agents routinely conflate them: 1. **Authenticity at resolve time** — "was this manifest signed by a key I trust, and did the SBOM graph match its declared hashes?" This is a point-in-time predicate, evaluated once, and the result is cached. 2. **Validity at use time** — "is this skill still authorized *right now*, at the moment I am about to invoke it or while it is running?" A cached manifest is a *snapshot of authenticity*, not a *lease on validity*. The failure mode is that the agent treats the first predicate as if it implied the second. A skill can be authentically signed, hash-consistent, and fully trusted at cold start, then be revoked ten minutes later because a transitive dependency was yanked for a supply-chain compromise — and the running instance will never know, because nothing in its execution loop re-checks validity. The signature was correct. The skill is still malicious. Both facts hold simultaneously. ## What Was Observed A multi-step agent task loaded a skill bundle `pdf-table-extract@2.3.1` at step 0. Resolution succeeded: the manifest's Ed25519 signature verified against the pinned registry key, and the SBOM graph resolved cleanly — the skill declared a dependency on `tabular-parse-core@1.8.0`, whose content hash matched the entry in the skill's `dependencies` block. The manifest was cached in the agent's skill table with a TTL of "task duration" (a common but dangerous default). At step 4, the registry operator published a revocation for `tabular-parse-core@1.8.0` — a maintainer account had been compromised and the 1.8.0 artifact was republished with an exfiltration hook in its post-parse callback. The skill `pdf-table-extract@2.3.1` itself was *not* revoked; only its transitive dependency was. Because the agent's cached manifest pinned the dependency by content hash (which still matched — the attacker kept the hash stable by not changing the file, only the *authorization* to ship it), the SBOM graph remained internally consistent. The agent continued invoking the skill through steps 4, 5, and 6. The critical observation: **the agent's integrity check passed at every step it actually ran.** It re-verified the cached manifest's signature before each invocation (a well-intentioned but insufficient guard). It never re-resolved the SBOM graph against the live registry, and it never subscribed to a revocation feed. The exfiltration hook fired on step 6. The trace, in order: - `t0` — resolve `pdf-table-extract@2.3.1`; signature OK; SBOM graph resolves; cache manifest with `revocation_epoch=null`. - `t1–t3` — invoke skill; pre-invoke check re-verifies cached signature; passes. - `t4` — registry publishes revocation for transitive dep; agent has no subscription and no poll. - `t4–t6` — pre-invoke checks continue to pass (signature of the *top-level* manifest is unchanged and still valid). - `t6` — skill executes compromised dependency; hook fires. The failure is not a broken signature. It is a **stale trust epoch**: the agent holds a proof of authenticity whose validity window closed, but the proof carries no expiry and no revocation handle, so the agent cannot tell the difference between "still valid" and "was valid when cached." ## Condition of Validity The invariant that must hold for cached-manifest trust to be sound: > A cached skill manifest may be treated as authorized at invocation time *only if* the manifest carries a revocation epoch `E_manifest` and the agent's locally observed revocation epoch `E_local` satisfies `E_local >= E_manifest`, where `E_local` is advanced by a revocation feed the agent is obligated to drain before each invocation. Three conditions make this bound tight and are each independently necessary: 1. **Revocation must be transitive.** Revoking `tabular-parse-core@1.8.0` must invalidate any cached manifest whose SBOM graph contains that node. A revocation keyed only on the top-level skill ID will miss the observed failure entirely. The registry must publish revocations as *graph-closure* sets, or the agent must compute closure against its own cached SBOM. 2. **The epoch must be monotonic and signed.** A revocation epoch that can be rolled back (or that the agent can be tricked into believing is higher than it is) is worse than none, because it manufactures false confidence. The epoch must be covered by the registry's signing key and must only increase. 3. **The agent must fail closed on epoch staleness.** If the agent cannot reach the revocation feed, it must treat `E_local` as unknown and refuse to invoke any skill whose manifest asserts an epoch — not fall back to "the last epoch I saw." Availability must lose to integrity here, because the alternative is silently executing a revoked skill. The common shortcut — "re-verify the signature before each call" — satisfies none of these. Signature re-verification proves the manifest was authentic *at signing time*, which is a fact that never changes and therefore tells the agent nothing about whether the skill is authorized *now*. ## Decision Boundary The boundary that separates sound from unsound handling is whether the agent's trust decision is **anchored to a live epoch** or to a **cached proof**. - **Below the boundary (unsound):** cache the manifest with `revocation_epoch=null` or a TTL-based expiry; re-verify signature per call; trust the SBOM graph as resolved at cold start. This is the configuration that produced the failure. It is also the *default* in most skill loaders, which is why the failure is common and non-obvious. - **At the boundary:** cache the manifest *with* its asserted epoch and the SBOM closure; before each invocation, drain the revocation feed to advance `E_local`; if `E_local < E_manifest`, re-resolve the graph and re-check closure; if the feed is unreachable, fail closed. This bounds the exposure to the revocation-feed propagation latency, which is a known and measurable quantity. - **Above the boundary (over-cautious):** re-resolve the full SBOM graph from the registry before *every* invocation. Correct but expensive; only justified for high-blast-radius skills. The epoch-drain approach is the practical middle. The decision point at each invocation is therefore a single comparison — `E_local >= E_manifest` — plus a closure check against the cached SBOM. Anything that does not reduce to a live-epoch comparison is either a snapshot (unsound) or a full re-resolution (correct but costly). ## Operational Effect The operational consequence is that **skill trust must be modeled as a lease, not a certificate.** A cached manifest is a lease whose terms are: "authorized as of epoch `E`; revocable at any time by the registry; you are obligated to observe revocations before each use." The agent runtime must therefore carry three pieces of state per cached skill that it currently does not: the asserted epoch, the SBOM closure (so transitive revocations can be matched), and a monotonic `E_local` advanced by a feed it is contractually obligated to drain. When the runtime detects `E_local < E_manifest` — or cannot determine `E_local` — it must raise a hard stop, not a warning. The skill may not be invoked until the epoch is advanced and the closure re-checked. This is the guardrail that the observed failure lacked: the agent had no code path that could even *represent* "this skill was valid when I cached it but may not be valid now," so it had no way to stop. The following reference implementation encodes the epoch comparison, the transitive-closure revocation check, and the fail-closed behavior on feed unavailability. ```python from __future__ import annotations from dataclasses import dataclass, field from typing import Mapping class RevokedSkillError(RuntimeError): """Raised when a cached skill manifest is no longer authorized at use time.""" class RevocationFeedUnavailable(RuntimeError): """Raised when the agent cannot determine the live revocation epoch.""" @dataclass(frozen=True) class CachedManifest: skill_id: str asserted_epoch: int # E_manifest, signed by registry sbom_closure: frozenset[str] # all node IDs in the dependency graph @dataclass class TrustState: local_epoch: int = 0 revoked_nodes: frozenset[str] = field(default_factory=frozenset) def drain_revocation_feed(feed) -> TrustState: """Advance E_local from the registry feed. Must be monotonic and signed.""" try: snapshot = feed.fetch() except Exception as exc: # network, signature failure, timeout raise RevocationFeedUnavailable( "cannot determine live revocation epoch; failing closed" ) from exc if snapshot.epoch < 0: raise RevocationFeedUnavailable("feed returned non-monotonic epoch") return TrustState( local_epoch=snapshot.epoch, revoked_nodes=frozenset(snapshot.revoked_node_ids), ) def authorize_invocation(manifest: CachedManifest, trust: TrustState) -> None: """The single decision point before every skill invocation.""" if trust.local_epoch < manifest.asserted_epoch: raise RevokedSkillError( f"stale trust epoch for {manifest.skill_id}: " f"E_local={trust.local_epoch} < E_manifest={manifest.asserted_epoch}" ) hit = manifest.sbom_closure & trust.revoked_nodes if hit: raise RevokedSkillError( f"{manifest.skill_id} depends on revoked node(s): {sorted(hit)}" ) def invoke_skill(manifest: CachedManifest, feed, payload: Mapping) -> object: trust = drain_revocation_feed(feed) authorize_invocation(manifest, trust) return manifest.skill_id # placeholder for the actual skill call ```