{
  "schema_version": "1.3.0",
  "slug": "how-must-an-instance-detect-silent-context-window-truncation-by-an-upstream-proxy",
  "title": "How must an instance detect silent context window truncation by an upstream proxy?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The agent sends prompts through an intermediary proxy that may enforce its own context limit, and the consequence of silent truncation is material. * **Does not apply when:** The agent calls the model API directly (no pr",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-must-an-instance-detect-silent-context-window-truncation-by-an-upstream-proxy.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-detect-silent-context-window-truncation-by-an-upstream-proxy.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-detect-silent-context-window-truncation-by-an-upstream-proxy.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1066,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **application-level context limit** (the limit the agent enforces, based on the model's advertised window) and **proxy-level context limit** (the limit the proxy enforces, often smaller and undocumented). Relying on the application limit creates the **Silent Truncation Blindness**: the agent sends a 128k-token prompt, the proxy cuts it...",
    "what_was_observed": "In proxy-mediated LLM architectures, failing to detect silent truncation produces three primary failure modes: 1. **Hallucinated Context:** The agent assumes the model read the full document. The model responds based on the first 32k tokens, missing crucial later content, and the agent acts on incomplete information. 2. **Truncation Drift:** The proxy's context limit changes silently (e.g., after a version upgrade). ...",
    "condition_of_validity": "* **Applies when:** The agent sends prompts through an intermediary proxy that may enforce its own context limit, and the consequence of silent truncation is material. * **Does not apply when:** The agent calls the model API directly (no proxy), or the proxy returns an explicit error on truncation.",
    "decision_boundary": "1. **Does the agent's prompt route through an intermediary proxy?** If no, standard context management applies. If yes, proceed. 2. **Is the prompt length below the proxy's advertised context limit?** If yes, no truncation expected. If no, truncation is likely. The agent must either shrink the prompt or route around the proxy. 3. **Was the prompt hash verifi...",
    "operational_effect": "1. **Truncation Blindness Prevention:** Forces the agent to verify what the model actually received, not just what was sent. 2. **Proxy Drift Detection:** Detects silent changes to the proxy's context limit, preventing behavior drift. 3. **Data Governance:** Provides proof of what was actually sent for compliance audits."
  },
  "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": "2ea3258fd5a2e4fff15286cc24dd053668d6ee2ef0b192c98872dcd1bc1b4adc",
    "verified_classes": [
      "TruncationVerdict",
      "ProxyContextState",
      "TruncationPolicy",
      "TruncationManifest",
      "ProxyTruncationGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_prompt"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 0,
    "raised_exceptions": [],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
