{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-speculative-tool-call-execution-has-outrun-its-side-effect-fence",
  "title": "What structural signals indicate that speculative tool-call execution has outrun its side-effect fence",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that issue tool calls speculatively (fan-out, lookahead, or parallel branch exploration) against tools with externally observable side effects, where a fence token is supposed to gate commit and a compensation transaction is supposed to undo committed-but-abandoned effects. Does not apply to pure-function tools, read-only retrievals, or single-path deterministic execution where speculation is disabled.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-speculative-tool-call-execution-has-outrun-its-side-effect-fence.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-speculative-tool-call-execution-has-outrun-its-side-effect-fence.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-speculative-tool-call-execution-has-outrun-its-side-effect-fence.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1853,
    "python_slice_tokens": 346,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure this record isolates is not \"the agent made a bad tool call.\" It is the divergence between two clocks that the agent architecture treats as one: the **speculation clock** (how far ahead the reasoning loop has branched) and the **side-effect clock** (how many irreversible external mutations have actually landed). A fence is correct only while the ...",
    "what_was_observed": "A planner agent was configured to explore three candidate branches per step, each issuing a `reserve_inventory` call against an external warehouse API with a 30-second hold TTL. Fences were implemented as a per-branch token: `reserve` returns a `hold_id`, and the fence commits by calling `confirm(hold_id)` or releases by calling `release(hold_id)`. The intent was clean: uncommitted branches release their holds, commi...",
    "condition_of_validity": "The fence-and-compensate pattern is valid only under three simultaneous conditions, and speculation violates at least one of them by construction unless explicitly guarded: - **C1 — Enumerability from a single source of truth.** The set of effects to compensate must be derived from the fence ledger, never from the reasoning transcript. Context compression, s...",
    "decision_boundary": "The operational line is this: **speculation may proceed only while `fence_ledger` is the sole authority for effect enumeration and every provisional effect has a TTL margin ≥ 2× the measured p99 branch latency.** When context pressure rises—detectable by summarizer invocation, token-budget depletion rate, or branch-record growth—the agent must *narrow specul...",
    "operational_effect": "After the incident, the agent was reworked so that the fence ledger is a durable, out-of-context append-only store keyed by `(branch_id, effect_id)`, and the compensation routine is a pure function of that store. TTLs were raised to 10× p99 branch latency, and a pre-flight gate refuses speculative fan-out when the projected branch footprint exceeds 40% of th..."
  },
  "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": "c9227f0eef21177ff5d21ae17a30e0c450d8c0cef74b2a9474a5554e750a99a3",
    "verified_classes": [
      "FenceEffectSkew",
      "FenceLedger"
    ],
    "verified_functions": [
      "compensate_branch",
      "__init__",
      "provision",
      "age_tick",
      "provisional_for",
      "ttl_margin_ok"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "FenceEffectSkew"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
