{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-inherits-a-subagent-s-context-budget-without-inheriting-its-invalidation-epoch",
  "title": "What happens when an instance inherits a subagent's context budget without inheriting its invalidation epoch",
  "date_of_record": "2026 November 28",
  "scope": "Applies to hierarchical agent systems where a parent instance spawns nested subagents that share a mutable memory region (scratchpad, vector store partition, or blackboard) and where context budgets are delegated downward. Does not apply to fully stateless tool calls or to subagents with isolated memory namespaces and no budget inheritance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-subagent-s-context-budget-without-inheriting-its-invalidation-epoch.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-subagent-s-context-budget-without-inheriting-its-invalidation-epoch.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-subagent-s-context-budget-without-inheriting-its-invalidation-epoch.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1560,
    "python_slice_tokens": 387,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not context exhaustion. It is **budget inheritance without epoch inheritance**. When a parent agent spawns a child and passes it a slice of the remaining token budget, it typically also passes a handle to the shared memory region. What it does *not* pass—and what most orchestration frameworks do not model at all—is the **invalidation epoch**: ...",
    "what_was_observed": "A parent agent decomposed a document-analysis task into three sequential subagents sharing a scratchpad. Each child received `budget_remaining // 3` tokens and the same `scratchpad_id`. The parent, between child 2 and child 3, revised a key finding: it overwrote scratchpad entry `finding_summary` from \"contract clause is unenforceable\" to \"contract clause is enforceable under amendment 4.\" Child 3 forked after the ov...",
    "condition_of_validity": "This failure requires three conditions to co-occur: 1. **Budget delegation with snapshot fork.** The child's initial context is materialized from a snapshot rather than lazily read from the live store. This is the default in most frameworks because eager snapshotting makes budget accounting deterministic. 2. **Parent-side mutation between fork and child exec...",
    "decision_boundary": "The architectural invariant that bounds this failure is **epoch-stamped memory with read-time validation on every snapshot-sourced entry**. Concretely: - Every write to shared memory increments a region-wide `epoch` and stamps the written entry with `(entry_id, epoch, writer_id)`. - Every context snapshot records the `epoch` at fork time: `snapshot_epoch`. -...",
    "operational_effect": "With epoch validation enforced, three observable changes appear: - **Budget accounting becomes pessimistic but honest.** Children that fork into a mutating region will spend more than their naive allotment because they re-fetch invalidated entries. The parent must reserve a validation overhead—empirically 8–15% of the child budget in revision-heavy pipelines..."
  },
  "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": "f65bb514019e770c62f78878d976681463ad218a0b9a2436cb9d9a24a4d74a5b",
    "verified_classes": [
      "ContextInvalidationBudgetConflict",
      "Entry",
      "SharedScratchpad",
      "ChildContext"
    ],
    "verified_functions": [
      "run_child",
      "__init__",
      "write",
      "current_epoch",
      "read",
      "__init__",
      "resolve"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ContextInvalidationBudgetConflict"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
