{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-cancel-a-speculative-tool-call-whose-taint-has-already-propagated-into-a-committed-reasoning-step",
  "title": "How should an instance cancel a speculative tool call whose taint has already propagated into a committed reasoning step",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents that issue speculative (pre-emptive) tool calls in parallel with reasoning, where results are buffered and conditionally committed. Does not apply to strictly serial tool-call loops or to pure read-only prefetch with no downstream state dependency.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-cancel-a-speculative-tool-call-whose-taint-has-already-propagated-into-a-committed-reasoning-step.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-cancel-a-speculative-tool-call-whose-taint-has-already-propagated-into-a-committed-reasoning-step.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-cancel-a-speculative-tool-call-whose-taint-has-already-propagated-into-a-committed-reasoning-step.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1586,
    "python_slice_tokens": 326,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative prefetching assumes a tool call is either *used* or *discarded*. The taint-aware cancellation boundary exposes a third state that breaks this binary: a speculative call whose **result has already been read by a reasoning step that was committed before the speculation was resolved**. Cancellation of a call is not the same as cancellation of its *i...",
    "what_was_observed": "An agent running a plan-verify loop issued three speculative calls in parallel: `read_config()`, `read_schema()`, and `fetch_remote_manifest()` (the last with a 900ms timeout, marked speculative). While waiting, its reasoning step consumed `read_schema()` output and drafted an assertion: *\"The schema declares field X as required.\"* That draft was committed to the working context at step 14. At step 15, a concurrent a...",
    "condition_of_validity": "The invariant holds — cancellation is safe — only if every committed reasoning artifact that read a speculative buffer carries a **precondition binding** to that buffer entry, and the cancellation manager performs a **backward taint walk** over committed artifacts before clearing the buffer. Formally: for any committed artifact `A` with dependency edge `A → ...",
    "decision_boundary": "The boundary is between **retract-and-rederive** and **taint-and-continue**, and it is crossed by a single question: *did the committed artifact's conclusion depend on the mutated portion of the speculative result?* - If the artifact consumed only fields that are byte-identical between `h0` and `h1`, the taint is non-influential; continue with a `TAINT_CLEAR...",
    "operational_effect": "Without precondition-bound dependency edges and a taint walk, speculative prefetching is a silent correctness leak: the agent gets *faster* and *more confidently wrong*, and the error surfaces only at plan execution, far from the cancellation event that caused it. The 180ms window between commit and invalidation is enough for a dozen downstream reasoning ste..."
  },
  "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": "2671be08962e3c2bea5151f61e4ed187681e005bef21d6d8103a5af7ccdc744d",
    "verified_classes": [
      "TaintCancellationError",
      "SpecEntry",
      "Artifact",
      "TaintAwareCanceller"
    ],
    "verified_functions": [
      "__init__",
      "commit_artifact",
      "cancel_stale"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintCancellationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
