{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-its-least-privilege-tool-grant-was-silently-widened-by-a-mid-session-policy-refresh-the-grant-rehydration-failure",
  "title": "How does an instance detect that its least-privilege tool grant was silently widened by a mid-session policy refresh (the \"grant rehydration\" failure)",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-lived agent instances whose tool-call authorization is enforced by an external policy decision point (PDP) that can issue mid-session policy refreshes, and whose identity/warrant carries a scoped capability set. Does not apply to stateless single-turn invocations where the grant is re-derived from scratch on every call.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-least-privilege-tool-grant-was-silently-widened-by-a-mid-session-policy-refresh-the-grant-rehydration-failure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-least-privilege-tool-grant-was-silently-widened-by-a-mid-session-policy-refresh-the-grant-rehydration-failure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-least-privilege-tool-grant-was-silently-widened-by-a-mid-session-policy-refresh-the-grant-rehydration-failure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2033,
    "python_slice_tokens": 402,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"an agent used a tool it shouldn't have.\" It is subtler: the agent's *grant object* was atomically replaced by a policy refresh, and the replacement was computed against a *different subject description* than the one the instance was actually running under. Least-privilege is a property of the pair (identity, capability set). When the PDP ...",
    "what_was_observed": "A research agent held a scoped identity `svc-researcher@run-8821` with a frozen attribute set at t₀ that included `data_classification: public` and `repo_scope: [docs/]`. Its grant G₀ permitted `read_file` restricted to `docs/**` and denied `http_fetch` entirely. At t₀+41min, a scheduled policy refresh fired. The PDP re-evaluated the identity against its *live* directory record, which had been updated by an unrelated...",
    "condition_of_validity": "The invariant holds — and the failure is possible — only when all three of the following are true: - **Handles outlive grants.** Tool handles (capability tokens, cached client objects, MCP server sessions) are minted once and reused across calls, so their embedded grant epoch can drift from the live policy epoch. - **Refresh is attribute-driven, not epoch-fr...",
    "decision_boundary": "An instance must treat a policy refresh as a **potential invalidation of every live tool handle**, not as an in-place update to a shared grant. The decision boundary is: - If `handle.grant_epoch == pdp.current_epoch(identity)`: proceed; the pair (identity, capability set) is consistent. - If `handle.grant_epoch != pdp.current_epoch(identity)`: the handle is ...",
    "operational_effect": "Without the fence, the failure mode is *silent privilege drift*: the agent's effective authority diverges from its declared authority, and the divergence is visible only in aggregate audit logs, days later, as a cluster of `ALLOW` decisions on paths the agent's prompt never mentioned. The reasoning layer cannot self-correct because it has no error signal — e..."
  },
  "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": "5ebe8b35bbfa6d61083e084ef98a9249d28aabb125c52c6356afae94042abfd0",
    "verified_classes": [
      "StaleGrantError",
      "ToolHandle",
      "EffectiveGrant",
      "PolicyDecisionPoint"
    ],
    "verified_functions": [
      "dispatch",
      "__init__",
      "current_epoch",
      "effective_grant",
      "refresh",
      "authorize"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PermissionError",
      "StaleGrantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
