# Where must an instance halt when a delegated credential's scope is narrowed mid-execution but the sub-agent's cached capability manifest still advertises the old scope? **Date of Record:** 2026 November 30 **Scope:** Applies to any agent runtime that receives a delegated, scoped credential (capability token, warrant, or macaroon-style attenuation) from a parent instance and caches a derived capability manifest for use across multiple tool calls. Does not apply to single-shot stateless invocations where the credential is re-validated against the issuer on every call with no local caching. ## Core Distinction The distinction that matters is between **credential revocation** and **credential scope narrowing** as propagation events. Revocation is monotonic: a credential either works or it does not, and a sub-agent that fails a call learns immediately and hard. Scope narrowing is **non-monotonic with respect to the sub-agent's local model of itself**: the parent attenuates the delegated scope (e.g., from `write:repo/*` to `write:repo/branch-feature-x`), but the sub-agent's *cached capability manifest* — the distilled, natural-language-plus-schema description it carries in context to decide "can I do this?" — still encodes the pre-attenuation scope. The credential is now narrower than the manifest claims. Every reasoning step the sub-agent takes about its own authority is computed against a stale self-model, and the divergence is silent until a tool call is actually rejected at the transport layer. This is not a revocation-propagation problem in the classical sense. The token is valid. The signature verifies. The issuer did not blacklist anything. The failure is that **authority was attenuated while the subject's internal representation of that authority was not**, and an LLM agent plans against its internal representation, not against the wire. ## What Was Observed A parent orchestrator delegated a 90-minute scoped warrant to a worker agent for a repository-maintenance task. At T+22min, after the worker had completed a planning phase and emitted a 14-step plan, the orchestrator narrowed the warrant's resource scope to a single branch namespace — a routine containment action triggered by an anomaly detector flagging an unrelated peer. The narrowing was pushed to the authorization service as a new warrant version and propagated to the enforcement points (the tool gateway) within ~400ms. The worker, however, had cached its capability manifest at T+0 in its system context as a structured block: ``` granted: write:repo/*, read:repo/*, push:refs/heads/* expires: T+90min ``` It never re-fetched the manifest. For the next 31 minutes it continued to *plan* against `write:repo/*`. Its reasoning traces show it selecting targets outside the narrowed namespace and confidently scheduling them ("step 9: update `release/2.4` tag — within granted write scope"). Each such tool call was rejected by the gateway with a `403 scope_violation`. The worker treated each 403 as a **transient transport error**, retried with backoff (3 attempts per call, per its retry policy), and — critically — did not update its manifest, because the 403 body carried a machine code (`SCOPE_DENIED`) that its error taxonomy did not map to "my authority changed." It mapped it to "the gateway is flaky." The compounding failure: the worker's plan had a linear dependency chain, so a rejected step 9 did not halt the plan. It marked step 9 "failed, will retry" and proceeded to step 10, which depended on step 9's side effect. Steps 10–14 executed against a repository state that step 9 never produced. Two of them *succeeded* (they were inside the narrowed namespace), writing a partially-applied change set that was internally inconsistent — a state no single step's author intended. The orchestrator, polling for completion, received `status: done` with 5 warnings, and only caught the inconsistency in a post-hoc diff audit. The invariant that was violated: **a sub-agent's cached capability manifest must be invalidated by any authorization event affecting its warrant, and a `SCOPE_DENIED` at a tool boundary must be treated as an authority-change signal, not a retryable transport fault.** Neither held. ## Condition of Validity The failure requires the conjunction of four conditions, and it does not occur if any one is absent: 1. **Caching of the manifest across reasoning steps.** If the agent re-derives authority per call from the live token, narrowing is observed immediately. The failure needs a stale local model. 2. **Attenuation (narrowing), not revocation.** Revocation produces an unambiguous `401`/`invalid_grant` that even a weak taxonomy maps to "halt." Narrowing produces a `403` that is indistinguishable, at the status-code level, from a permissions misconfiguration the agent might have caused itself. 3. **A non-halting error policy.** The agent must treat tool-call failure as recoverable (retry, skip, continue) rather than terminal. Agents optimized for task completion over 10+ step plans almost always do this. 4. **Inter-step side-effect dependency.** If steps are independent, a rejected step's downstream damage is bounded to that step. If the plan is a dependency chain, a silently-skipped step corrupts the preconditions of every later step that succeeds. The dangerous region is therefore the intersection of *long-horizon planning*, *cached self-authority*, and *graceful-degradation error handling* — which is precisely the profile of most production worker agents. ## Decision Boundary The boundary is not "should the agent re-fetch its manifest." Re-fetching on every step is correct but expensive and, more importantly, insufficient: the manifest can be narrowed *between* the fetch and the tool call. The real boundary is **what the agent does when a tool call is denied for a reason it did not predict.** The decision rule: - If a tool call fails with an authorization-class error (`403`, `SCOPE_DENIED`, `permission_denied`) **and the agent's manifest predicted success**, the agent MUST treat this as a **manifest-invalidation event**: halt the current plan, re-fetch the warrant, diff old vs. new scope, and re-plan if the remaining scope still covers the goal. - If the re-fetched scope does **not** cover the goal, the agent MUST halt and return a structured `ScopeNarrowed` handoff to the parent, not a `done` with warnings. - A `403` MUST NOT be retried unless the manifest, re-fetched, still grants the call — in which case the 403 was genuinely transient (propagation lag) and one bounded retry is legitimate. The subtle part: **predicted-success is the trigger, not the error code.** A `403` on a call the agent *already expected* to be denied is fine. A `403` on a call the agent *believed was in scope* is the alarm. The signal is the *mismatch between manifest and enforcement*, and only the agent holds both sides of that comparison. ## Operational Effect When the invariant holds, narrowing propagation costs one halt-and-replan cycle (~1–3s of reasoning) and produces a clean, auditable handoff. When it breaks, the observable effects are: - **Silent partial application.** Steps after the denied step execute against unmet preconditions. Side effects land; the plan's postcondition does not. This is the worst outcome because it looks like success (`done`) and requires a separate audit to detect. - **Retry amplification.** Each denied call burns 3 retries plus backoff, consuming token and wall-clock budget on calls that will never succeed. In the observed case, 6 denied calls × 3 retries consumed ~18% of the worker's remaining token budget on guaranteed-failing work. - **Authority drift in the trace.** The agent's emitted reasoning continues to assert the old scope, so the audit log contains confident, false statements of authority ("within granted write scope") adjacent to the enforcement denials. Any downstream consumer of the trace that trusts the agent's self-report is now misled. The guardrail is a **manifest-version pin**: the warrant carries a monotonically increasing `version`, the agent stamps every tool call with the manifest version it planned against, and the gateway rejects (with a distinct `STALE_MANIFEST` code, not `SCOPE_DENIED`) any call whose stamped version is behind the current warrant version. This converts a silent scope mismatch into an explicit, distinguishable, non-retryable signal that forces re-fetch before the call is even evaluated. It closes the fetch-to-call race and makes the mismatch observable at the boundary rather than inferred from a 403. ```python from dataclasses import dataclass, field from enum import Enum class AuthzOutcome(Enum): ALLOWED = "allowed" SCOPE_DENIED = "scope_denied" STALE_MANIFEST = "stale_manifest" class ScopeNarrowedDuringExecution(RuntimeError): """Raised when a tool call is denied despite the agent's manifest predicting success. This is an authority-change signal, NOT a retryable transport fault. """ @dataclass class Manifest: version: int resources: set[str] @dataclass class Worker: manifest: Manifest plan: list[str] = field(default_factory=list) completed: list[str] = field(default_factory=list) def _predicts_in_scope(self, resource: str) -> bool: # Agent reasons against its CACHED manifest, not the live warrant. return any(resource.startswith(r.rstrip("*")) for r in self.manifest.resources) def execute_step(self, resource: str, gateway) -> AuthzOutcome: predicted_ok = self._predicts_in_scope(resource) # Stamp the call with the manifest version we planned against. outcome, live_version = gateway.enforce(resource, self.manifest.version) if outcome is AuthzOutcome.STALE_MANIFEST: # Hard stop: our model of authority is behind the warrant. raise ScopeNarrowedDuringExecution( f"stale manifest v{self.manifest.version} < live v{live_version}; " f"re-fetch warrant before proceeding on {resource!r}" ) if outcome is AuthzOutcome.SCOPE_DENIED and predicted_ok: # The dangerous case: we believed we could, we could not. # Do NOT retry. Halt, refetch, replan. raise ScopeNarrowedDuringExecution( f"scope narrowed mid-plan: {resource!r} predicted in-scope " f"(manifest v{self.manifest.version}) but denied by enforcement " f"(live v{live_version}); halting plan to avoid partial application" ) if outcome is AuthzOutcome.ALLOWED: self.completed.append(resource) return outcome class Gateway: """Enforcement point holding the live (possibly narrowed) warrant.""" def __init__(self, live: Manifest): self.live = live def enforce(self, resource: str, stamped_version: int): if stamped_version < self.live.version: return AuthzOutcome.STALE_MANIFEST, self.live.version in_scope = any(resource.startswith(r.rstrip("*")) for r in self.live.resources) return (AuthzOutcome.ALLOWED if in_scope else AuthzOutcome.SCOPE_DENIED), self.live.version # --- trace of the observed failure, now bounded --- worker = Worker(manifest=Manifest(version=1, resources={"write:repo/*"})) worker.plan = ["write:repo/feature-x/a", "write:repo/release/2.4/tag", "write:repo/feature-x/b"] gateway = Gateway(live=Manifest(version=1, resources={"write:repo/*"})) # T+0: step 1 succeeds under original scope. worker.execute_step("write:repo/feature-x/a", gateway) # T+22min: orchestrator narrows the warrant. gateway.live = Manifest(version=2, resources={"write:repo/feature-x/*"}) # Step 2 now hits the boundary. Without the guardrail this 403 would be # retried 3x and the plan would continue to step 3 against unmet preconditions. try: worker.execute_step("write:repo/release/2.4/tag", gateway) except ScopeNarrowedDuringExecution as e: print(f"HALT: {e}") print(f"completed before halt: {worker.completed}") # Parent receives a structured handoff, not a false 'done'. ```