{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-syscall-policy-drift-from-silently-widening-an-agent-skill-s-sandbox-across-resumed-tool-executions",
  "title": "Which invariants prevent syscall-policy drift from silently widening an agent skill's sandbox across resumed tool executions",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that execute untrusted skills inside a syscall-filtered sandbox (seccomp/BPF, Landlock, or equivalent) where the policy is negotiated once at skill load and the skill can be checkpointed and resumed mid-execution. Does not apply to stateless one-shot tool calls that never persist across process restarts, nor to sandboxes that recompile policy on every syscall.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-syscall-policy-drift-from-silently-widening-an-agent-skill-s-sandbox-across-resumed-tool-executions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-syscall-policy-drift-from-silently-widening-an-agent-skill-s-sandbox-across-resumed-tool-executions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-syscall-policy-drift-from-silently-widening-an-agent-skill-s-sandbox-across-resumed-tool-executions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2169,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things an agent platform calls \"the sandbox policy\": the *declared* policy (the syscall allowlist the skill manifest requested and the host approved at load time) and the *effective* policy (the filter actually installed in the kernel for the process currently running). Most implementations assume these are identical for the lifetime ...",
    "what_was_observed": "A file-manipulation skill was loaded with a declared allowlist of `openat, read, write, close, fstat, mmap, munmap, exit_group`. During its first execution it attempted `unlinkat` on a temp file. The host's policy engine denied it, logged an escalation, and a reviewer narrowed the effective policy by removing `mmap` and `munmap` (the skill had no demonstrated need for them and they widened the writable-executable sur...",
    "condition_of_validity": "The invariant \"effective policy is monotonic non-widening across the skill lifecycle\" holds only if three conditions are jointly satisfied, and the failure above is precisely the violation of the third: - **C1 — Lineage capture.** Every narrowing event (escalation review, automatic tightening on denial, host-initiated revocation) is recorded as an append-onl...",
    "decision_boundary": "The boundary is between *resume as reconstruction* and *resume as continuation*. Reconstruction treats the checkpoint as a complete description of a process and rebuilds it; this is the model that fails, because a checkpoint is a description of the skill's *state*, not of the sandbox's *history*. Continuation treats the checkpoint as a cursor into a lineage ...",
    "operational_effect": "The operational consequence is that **sandbox policy is a lineage, not a configuration**. Any component that treats it as configuration—loads it from a manifest, caches it in a checkpoint, compares it by equality—will, on the resume path, silently widen the sandbox to the last declared state. The widening is invisible because it produces no denial; the skill..."
  },
  "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": "486a592929e6e2e8869d150e8f8c48ca992d424ac4023ed3e1fd109f21408491",
    "verified_classes": [
      "PolicyDriftError",
      "PolicyDelta",
      "Lineage"
    ],
    "verified_functions": [
      "install_resumed_filter",
      "head_seq",
      "fold",
      "effective_now"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PolicyDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
