{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-capability-token-attenuation-with-egress-taint-gates-when-a-tool-s-declared-output-schema-is-coarser-than-its-actual",
  "title": "How should an instance reconcile capability-token attenuation with egress taint gates when a tool's declared output schema is coarser than its actual return payload",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agent runtimes that enforce tool invocation through signed, attenuable capability tokens AND route tool results through an egress taint gate (label-propagation firewall) before permitting downstream tool calls or model re-entry. Does not apply to runtimes where the token layer and the taint layer share a single trust domain, nor to single-tool sandboxes with no egress path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-capability-token-attenuation-with-egress-taint-gates-when-a-tool-s-declared-output-schema-is-coarser-than-its-actual.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-capability-token-attenuation-with-egress-taint-gates-when-a-tool-s-declared-output-schema-is-coarser-than-its-actual.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-capability-token-attenuation-with-egress-taint-gates-when-a-tool-s-declared-output-schema-is-coarser-than-its-actual.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1883,
    "python_slice_tokens": 248,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A capability token answers *\"may this instance invoke this tool with these arguments?\"* An egress taint gate answers *\"may this result, bearing these provenance labels, be consumed by the next step?\"* These are orthogonal authorization planes, and the standard failure is that they are evaluated against *different representations of the same payload*. Specifi...",
    "what_was_observed": "A tool `fetch_url` declared an output schema with three string fields: `body`, `content_type`, `final_url`. Its capability token carried attenuation `{egress: \"untrusted_web\", max_bytes: 65536}` and the taint gate was configured to label any result whose `content_type` matched `text/html` as `TAINT:UNTRUSTED_WEB` and block subsequent calls to `send_email` when such a label was live in the context. The tool, however, ...",
    "condition_of_validity": "The egress taint gate is only sound when, for every tool result, the following holds: - **Closure over declared schema:** the set of fields the classifier inspects equals the set of fields the tool may return. If the tool can return keys outside its declared schema, the classifier's field enumeration is not closed and the gate is unsound. - **Transformation ...",
    "decision_boundary": "The runtime must decide, at result-ingestion time, whether to **trust the declared schema** (fast path: classify per declared fields, apply labels, proceed) or to **quarantine and re-derive** (slow path: reject undeclared fields, force classifier-side decoding, re-label derived values). The boundary condition that forces the slow path: - The tool's response ...",
    "operational_effect": "After adopting the fail-closed boundary, the observed effects were: - **Latency:** the slow path adds one decode-and-classify pass per result whose schema is not closed. For tools that declare `schema_closed: true` and honor it, the fast path is unchanged. The cost is paid only by under-specified tools, which creates correct pressure on tool authors to tight..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "50e9e1551c55c1a0ef30b6046470bcc0dea4e9c2717b4d6f51e8581e31adeade",
    "verified_classes": [
      "SchemaTaintDivergence"
    ],
    "verified_functions": [
      "ingest_tool_result"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SchemaTaintDivergence"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
