{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-samples-its-own-reasoning-trace-with-head-biased-observability-and-silently-discards-the-tail-of-a-failed-plan",
  "title": "What happens when an instance samples its own reasoning trace with head-biased observability and silently discards the tail of a failed plan",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent that emits multi-step reasoning traces through a sampling exporter (head sampling, tail sampling, or reservoir sampling) where the sampler runs in-process or at the collector boundary and the trace is later used for post-hoc diagnosis, replay, or distillation. Does not apply to fully synchronous, single-step tool calls with no intermediate reasoning state, nor to systems where every span is durably persisted before completion.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-samples-its-own-reasoning-trace-with-head-biased-observability-and-silently-discards-the-tail-of-a-failed-plan.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-samples-its-own-reasoning-trace-with-head-biased-observability-and-silently-discards-the-tail-of-a-failed-plan.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-samples-its-own-reasoning-trace-with-head-biased-observability-and-silently-discards-the-tail-of-a-failed-plan.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2209,
    "python_slice_tokens": 498,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *sampling a trace for cost control* and *sampling a trace for observability*. Cost-control sampling is a business decision: you accept that some traces vanish. Observability sampling is an epistemic decision: the trace you keep is the evidence you will later use to decide whether the agent behaved correctly. These two goals dive...",
    "what_was_observed": "A planning agent (`planner-v7`) ran a 12-step research task: retrieve → summarize → verify → retrieve → verify → synthesize → check → revise → check → revise → check → emit. Traces were exported through an in-process `HeadSampler` configured at `sample_rate=0.10` with a `decision_span=\"plan\"` — the sampler made its keep/drop decision immediately after the plan span completed, hashing `(trace_id, plan_hash)`. During a...",
    "condition_of_validity": "The invariant that must hold for observability sampling to be sound is: > **The sampling decision must be a function of a feature that is (a) available at decision time and (b) conditionally independent of the outcome class you intend to diagnose.** Formally, let `D ∈ {keep, drop}` be the sampler decision, `F` the feature it conditions on, and `Y ∈ {success,...",
    "decision_boundary": "The boundary is the **first span at which the outcome class becomes observable**. For `planner-v7`, that span is the third `verify` return, not the plan. Any sampling decision made before that span is a decision made under uncertainty about `Y`, and is therefore only valid if it is *outcome-blind* (pure ID hash) or *outcome-preserving* (error-override). The ...",
    "operational_effect": "After the incident, `planner-v7` was moved to a buffered tail sampler: spans accumulate in a 64-trace ring buffer per worker, and on trace completion the sampler retains if `any(span.status in {ERROR, PARTIAL})` or with probability `0.02` otherwise. The retained corpus's failure prevalence rose from 0% (head sampler) to 23% (tail sampler) on the same traffic..."
  },
  "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": "be73aa269709b25754c4edb4471c83b5a8b1bf07be75e35b0ac9dc76c88f79bf",
    "verified_classes": [
      "SamplingInvariantError",
      "SpanStatus",
      "Span",
      "Trace",
      "HeadSampler",
      "TailSampler"
    ],
    "verified_functions": [
      "audit_sampler",
      "outcome_observable",
      "__init__",
      "decide",
      "_feature_separates_outcome",
      "__init__",
      "on_span",
      "on_complete",
      "_uniform"
    ],
    "verified_functions_count": 9,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SamplingInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
