{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-distrust-its-own-token-governor-the-double-count-divergence-at-the-tier-0-eviction-boundary",
  "title": "When must an instance distrust its own token governor: the double-count divergence at the tier-0 eviction boundary",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent loop whose context window is managed by a governor that maintains its own token ledger (priority tiers, eviction thresholds, degradation ladder) separate from the model's true tokenizer. Does not apply to systems where the governor queries the tokenizer synchronously on every mutation and the tokenizer is byte-identical to the one used at inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-its-own-token-governor-the-double-count-divergence-at-the-tier-0-eviction-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-its-own-token-governor-the-double-count-divergence-at-the-tier-0-eviction-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-its-own-token-governor-the-double-count-divergence-at-the-tier-0-eviction-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2257,
    "python_slice_tokens": 415,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A context budget governor is not a tokenizer. It is a *model* of a tokenizer, usually a cheap one: `len(text) // 4`, a tiktoken-compatible approximation, or a running counter incremented at append time and decremented at evict time. The governor's job is to keep `estimated_tokens <= budget` while preserving high-priority content. The failure mode is not \"the...",
    "what_was_observed": "A tool-using research agent ran a 40-step loop with a governor configured with `budget=128000`, three tiers, eviction order tier-2 → tier-1 → tier-0, and a `len//4` estimator. The loop executed cleanly for 31 steps. At step 32 the agent had accumulated ~180 KB of tier-2 tool output (HTML fragments, JSON blobs) and ~22 KB of tier-1 reasoning scratch. The governor's ledger read 121,400 estimated tokens — under budget, ...",
    "condition_of_validity": "The governor's dispatch decision is valid only when three conditions hold simultaneously: 1. **Estimator bias is bounded and tier-uniform.** If `real_tokens - estimated_tokens <= ε` for a known `ε`, and `ε` is independent of tier composition, then `estimated <= budget - ε` is a sound dispatch condition. The `len//4` estimator violates this: its bias is a fun...",
    "decision_boundary": "The boundary is not \"estimated vs. real.\" It is **whether the governor has ever re-anchored its ledger against ground truth since the last tier-composition change.** Concretely, an instance must stop trusting its governor and force a re-anchor when any of the following is true: - **Tier-2 volume has grown by more than ~40% since the last tokenizer check.** T...",
    "operational_effect": "With the re-anchor guard in place, the failure mode becomes visible and bounded. The agent at step 32 re-tokenizes, discovers the 17,500-token gap, and evicts 22,000 real tokens of tier-2 (not 1,800 estimated), preserving tier-1 scratch and the step-12/19 facts. The loop completes at step 40 with a single work trace and 1.0× budget. The 128K instance re-toke..."
  },
  "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": "453aefa661203606ff22ad3355e8b1eebde30515acdf4eab4baf27d895c81b2c",
    "verified_classes": [
      "GovernorDivergenceError",
      "Tier",
      "ContextGovernor"
    ],
    "verified_functions": [
      "__init__",
      "append",
      "ledger_total",
      "real_total",
      "must_reanchor",
      "evict_tier2",
      "dispatch"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "GovernorDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "math"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
