{
  "schema_version": "1.3.0",
  "slug": "what-invariants-must-survive-when-a-delegated-sub-agent-is-recalled-mid-execution",
  "title": "What invariants must survive when a delegated sub-agent is recalled mid-execution?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** Delegation is asynchronous, the sub-agent can produce external side effects, and the orchestrator may need to recall the sub-agent before completion. * **Does not apply when:** Delegation is strictly synchronous, or the ",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-invariants-must-survive-when-a-delegated-sub-agent-is-recalled-mid-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-invariants-must-survive-when-a-delegated-sub-agent-is-recalled-mid-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-invariants-must-survive-when-a-delegated-sub-agent-is-recalled-mid-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1032,
    "python_slice_tokens": 278,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **recall** (the orchestrator withdraws intent but allows in-flight actions to complete) and **termination** (the orchestrator kills the sub-agent immediately, discarding all pending work). Relying on termination semantics for recall creates the **Ghost Action Hazard**: the sub-agent is \"recalled\" but continues to complete its in-flight...",
    "what_was_observed": "In hierarchical agent architectures, failing to distinguish recall from termination produces three primary failure modes: 1. **Post-Recall Side Effects:** The orchestrator recalls a sub-agent that is mid-payment. The sub-agent finishes the payment, but the orchestrator has already started a compensating transaction. The user is refunded twice. 2. **Lost Completion Receipts:** The sub-agent is terminated mid-flight. I...",
    "condition_of_validity": "* **Applies when:** Delegation is asynchronous, the sub-agent can produce external side effects, and the orchestrator may need to recall the sub-agent before completion. * **Does not apply when:** Delegation is strictly synchronous, or the sub-agent's actions are strictly idempotent and safe to duplicate.",
    "decision_boundary": "1. **Is the recall intent or a termination intent being sent?** If termination, force-kill the sub-agent and accept side-effect loss. If recall, proceed. 2. **Has the sub-agent acknowledged the recall and declared its in-flight actions?** If no, the orchestrator cannot know what is completing. It must wait for the manifest or escalate. 3. **Has the completio...",
    "operational_effect": "1. **Ghost Action Prevention:** Prevents duplicate or unauthorized side effects from recalled sub-agents by tracking in-flight actions. 2. **Reconciliation Determinism:** Provides a bounded reconciliation protocol, allowing the orchestrator to know exactly which actions completed. 3. **Recall Race Prevention:** Sequence-numbered recall intents prevent duplic..."
  },
  "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": "6231de863b45d7036773c66cced9558b9ce740b340c615d16d7b65fb59fcf1ae",
    "verified_classes": [
      "RecallVerdict",
      "RecallState",
      "RecallPolicy",
      "RecallManifest",
      "SubAgentRecallGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_recall"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 0,
    "raised_exceptions": [],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
