{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-lost-context-attribution-failures-in-compaction-aware-agent-traces",
  "title": "What structural signals indicate lost-context attribution failures in compaction-aware agent traces",
  "date_of_record": "2026 November 30",
  "scope": "Applies to LLM agents that perform in-place context compaction (summarization, eviction, or truncation) during a long-running task and emit observability traces spanning pre- and post-compaction spans. Does not apply to stateless single-turn inference or to agents whose context is never mutated mid-episode.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lost-context-attribution-failures-in-compaction-aware-agent-traces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lost-context-attribution-failures-in-compaction-aware-agent-traces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lost-context-attribution-failures-in-compaction-aware-agent-traces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1644,
    "python_slice_tokens": 260,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The boundary failure is not \"the agent forgot something.\" It is that **the trace cannot attribute the forgetting to a compaction event**, because the compaction boundary is not a first-class span in the trace graph. When context is compacted, the surviving spans downstream carry a *causal parent* (a tool call, a user turn) that no longer exists in the contex...",
    "what_was_observed": "A retrieval-augmented agent ran a 40-step task. At step 22 the context crossed 85% of the window and the runtime compacted: it summarized steps 1–21 into a 600-token digest and dropped the raw turns. The digest preserved the task goal and the most recent tool results but silently omitted a mid-episode user correction (\"use account `eu-west-2`, not `us-east-1`\"). At step 31 the agent called the provisioning tool with ...",
    "condition_of_validity": "This analysis holds only when three conditions are met, and each is a common omission: - **Compaction is a span, not a side effect.** The summarizer call must emit its own span with `tokens_in`, `tokens_out`, `entities_retained`, and a `generation` counter that increments monotonically per context lineage. - **Every downstream span records the generation it ...",
    "decision_boundary": "The operational decision is: **when a downstream span references a parent across a compaction generation boundary, the attributor must not treat the parent's payload as evidence of model input.** It must instead: - Resolve the model's actual input to the *compaction output*, and attribute lost constraints to the compaction span, not to the reasoning span. - ...",
    "operational_effect": "Instrumenting compaction as a generation-bearing span converts an unattributable class of failures into a bounded, queryable one. The practical consequences: - **Compaction policy becomes auditable.** You can compute, per generation, the retention rate of entities that later appear in violated constraints. A policy that drops `region_override`-class entities..."
  },
  "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": "f9320341a0cd62e0af179864e6a12ba9a35ab53fcb7b7cfb2b25fcfde55c2136",
    "verified_classes": [
      "CompactionAttributionError",
      "Span",
      "CompactionSpan"
    ],
    "verified_functions": [
      "attribute_failure",
      "enforce_generation_invariant"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionAttributionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
