{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-token-budget-exhaustion-is-caused-by-compaction-induced-context-re-expansion-rather-than-genuine-task-growth",
  "title": "What structural signals indicate token budget exhaustion is caused by compaction-induced context re-expansion rather than genuine task growth",
  "date_of_record": "2026 November 13",
  "scope": "Applies to long-horizon agents that persist context via summarize-then-truncate auto-compaction under a hard token budget, where the agent continues to execute tool calls across many turns. Does not apply to agents using retrieval-augmented external memory, where context is paged in on demand rather than compacted in place.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-token-budget-exhaustion-is-caused-by-compaction-induced-context-re-expansion-rather-than-genuine-task-growth.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-token-budget-exhaustion-is-caused-by-compaction-induced-context-re-expansion-rather-than-genuine-task-growth.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-token-budget-exhaustion-is-caused-by-compaction-induced-context-re-expansion-rather-than-genuine-task-growth.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1148,
    "python_slice_tokens": 199,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways an agent's context window reaches its token budget: the task genuinely grows (new tool outputs, new evidence, new subgoals accumulate), or compaction itself is inflating the context (each compaction pass produces a summary that, when re-injected alongside the retained tail and the system prompt, occupies more tokens than the segment it rep...",
    "what_was_observed": "In a 40-turn agent run with a 200k-token budget and a compaction trigger at 85% utilization, the agent hit the trigger 11 times. Between compaction N and N+1, net context growth averaged 14.2k tokens, but measured new task content (tool outputs plus user turns) averaged only 6.1k tokens. The residual 8.1k tokens per cycle were attributable to three structural artifacts: 1. **Summary framing overhead.** Each summary c...",
    "condition_of_validity": "This diagnosis holds only when the following are jointly true: (a) the compaction trigger is a fixed utilization fraction, not a fixed absolute headroom; (b) the summarizer is instructed to preserve constraints and prior summaries are fed back into it; (c) a retained tail is kept verbatim in addition to the summary. If the compaction policy discards the prio...",
    "decision_boundary": "Do not treat \"context is near budget\" as the decision point. The decision point is the slope of compaction interval length over cycles. Concretely: if the interval between compaction events shrinks by more than 20% per cycle across three consecutive cycles while per-turn new-content tokens are stable within ±15%, the budget pressure is compaction-induced and...",
    "operational_effect": "After switching to lineage-reset compaction and moving constraints out of the compacted region, the same workload ran 40 turns with 4 compactions, interval lengths of 11, 10, 12, and 9 turns (stable, not accelerating), and peak utilization of 71% of budget. The re-expansion residual dropped from 8.1k to 1.4k tokens per cycle. The operational lesson: an accel..."
  },
  "matched_failure_symptoms": [
    "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": "fafe0d99a8275ce9f7b1af3b4dd5cf4a546176b3ad42a3e92c5da93325be5cf2",
    "verified_classes": [
      "CompactionReexpansionError"
    ],
    "verified_functions": [
      "check_compaction_health"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionReexpansionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
