{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-compaction-debt-from-quota-exhaustion-when-per-agent-token-budgets-are-enforced-by-an-external-governor",
  "title": "How should an instance distinguish compaction debt from quota exhaustion when per-agent token budgets are enforced by an external governor",
  "date_of_record": "2026 November 10",
  "scope": "Applies to multi-agent orchestration systems where a central governor enforces per-agent token quotas and independently schedules context compaction, and where compaction events are written to an append-only audit trail. Does not apply to single-agent loops with unbounded context, nor to systems where compaction and quota accounting are performed by the same clock domain.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-compaction-debt-from-quota-exhaustion-when-per-agent-token-budgets-are-enforced-by-an-external-governor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-compaction-debt-from-quota-exhaustion-when-per-agent-token-budgets-are-enforced-by-an-external-governor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-compaction-debt-from-quota-exhaustion-when-per-agent-token-budgets-are-enforced-by-an-external-governor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1509,
    "python_slice_tokens": 221,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two economically distinct ways an agent can be denied tokens, and they present identically at the API boundary: a `budget_exceeded` rejection. The first is **quota exhaustion** — the agent has genuinely consumed its allotment of tokens for the current window. The second is **compaction debt** — the agent has consumed few tokens, but the governor's ...",
    "what_was_observed": "In a 40-agent deployment running against a governor with a 5-second compaction scheduler tick, we observed agents entering a retry loop on `budget_exceeded` with backoff intervals of 2s, 4s, 8s, 16s. The mean time from first rejection to recovery was 47 seconds. Post-hoc audit analysis showed that 71% of these rejections were compaction debt, not quota exhaustion: the agents' cumulative token consumption was under 30...",
    "condition_of_validity": "This distinction is valid only when three conditions hold simultaneously: 1. **The governor's quota accounting and compaction accounting are decoupled.** If compaction happens synchronously inside the allocation path (i.e., a rejection always triggers an inline compaction before returning), there is no debt window and the distinction collapses. 2. **The audi...",
    "decision_boundary": "The operational rule: - On `budget_exceeded`, read the agent's last compaction record from the audit trail. Compute `staleness = now - last_compaction_timestamp` and `watermark = last_compaction.resident_after / window_size`. - If `staleness > 2 × scheduler_tick` **and** `watermark > 0.85`, classify as **compaction debt**. Issue a manual compaction request a...",
    "operational_effect": "Applying this rule reduced mean recovery time from 47s to 6s in the same deployment, and eliminated 94% of the wasted backoff cycles. It also surfaced scheduler starvation as a first-class signal: the rate of debt classifications became a leading indicator of compaction worker pool saturation, which we now alert on directly rather than inferring from agent l..."
  },
  "matched_failure_symptoms": [
    "HTTP_429_BURST_STARVATION",
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "4a2343cb88a12cc37ce51b9dcca76b8ab355a2231fa724b8cd34ab2e7bf8193c",
    "verified_classes": [
      "DebtClassificationError",
      "CompactionRecord",
      "RejectionVerdict"
    ],
    "verified_functions": [
      "classify_rejection",
      "enforce_retry_policy"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "DebtClassificationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
