{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-syscall-policy-drift-when-a-sandboxed-tool-call-is-legitimately-re-executed-after-a-mid-flight-checkpoint-resume",
  "title": "How does an instance detect syscall-policy drift when a sandboxed tool call is legitimately re-executed after a mid-flight checkpoint resume",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents whose tool invocations are mediated by a syscall-level policy engine (seccomp-bpf, Landlock, or an eBPF LSM) and whose execution is checkpointed and resumed across instances. Does not apply to in-process function-call tools with no OS-level sandbox, nor to purely declarative capability grants enforced above the kernel.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-syscall-policy-drift-when-a-sandboxed-tool-call-is-legitimately-re-executed-after-a-mid-flight-checkpoint-resume.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-syscall-policy-drift-when-a-sandboxed-tool-call-is-legitimately-re-executed-after-a-mid-flight-checkpoint-resume.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-syscall-policy-drift-when-a-sandboxed-tool-call-is-legitimately-re-executed-after-a-mid-flight-checkpoint-resume.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1687,
    "python_slice_tokens": 351,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not a sandbox escape. It is a **false-positive exfiltration alarm caused by non-idempotent syscall replay**. When an agent checkpoints mid-tool-call and a fresh instance resumes, the replay of already-executed syscalls produces a syscall trace that is *individually legal but globally anomalous*: the same `openat`/`connect`/`sendto` sequence ap...",
    "what_was_observed": "A tool call to a \"fetch-and-summarize\" capability was checkpointed after `read()` of 4 MB from a mounted artifact file but before the `connect()` to the summarizer endpoint. On resume in a new instance: 1. The sandbox replayed the prefix from the last durable checkpoint. The kernel assigned a new PID (replay instance had PID 4411 vs. original 2207), and `openat` returned fd 7 instead of fd 3 because the resumed proce...",
    "condition_of_validity": "The invariant that makes replay-safe detection possible: > A syscall trace is *replay-continuous* iff, for every syscall `s` in the trace, `s.seq == detector.high_water + 1`, and `s.policy_hash == detector.policy_hash`. Any trace where `s.seq > detector.high_water + 1` is a **resume gap** and must be quarantined, not scored. Two corollaries bound the design:...",
    "decision_boundary": "The instance must choose between three post-resume policies: 1. **Replay-and-rescore** — replay the committed prefix through the detector before resuming live execution. Correct, but costs O(prefix) detector work and requires the detector to accept historical timestamps. 2. **Gap-quarantine** — mark the resume boundary as a gap; suppress windowed rules for t...",
    "operational_effect": "Without the sequence-bound invariant, resumed agents in a syscall-sandboxed deployment exhibit a characteristic failure signature: **tool calls succeed on first execution, fail with `EPERM` after any checkpoint resume, and the retry loop amplifies the alarm**. Operators typically misdiagnose this as a policy-engine bug or an agent hallucinating tool argument..."
  },
  "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": "1fec7e0de5c3d5f977c2807b1a23a7e63f189415b6026c7defbd5953aaae61f4",
    "verified_classes": [
      "SandboxReplayMismatch",
      "SyscallRecord",
      "AgentJournal"
    ],
    "verified_functions": [
      "resume_tool_call",
      "execute_resumed_tool",
      "prefix_digest"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SandboxReplayMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
