{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-a-sandbox-escape-from-a-legitimate-skill-escalation-when-syscall-level-capability-filters-are-the-only-enforcement",
  "title": "How should an instance distinguish a sandbox escape from a legitimate skill escalation when syscall-level capability filters are the only enforcement boundary",
  "date_of_record": "2026 November 14",
  "scope": "This record applies to agent runtimes that enforce skill isolation exclusively through seccomp/BPF-style syscall filters (with optional landlock/namespace confinement) and where skills are loaded dynamically at runtime from a registry. It does not apply to runtimes with a hypervisor or VM boundary, nor to runtimes where capability grants are pre-declared statically at process start and never mutated.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-sandbox-escape-from-a-legitimate-skill-escalation-when-syscall-level-capability-filters-are-the-only-enforcement.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-sandbox-escape-from-a-legitimate-skill-escalation-when-syscall-level-capability-filters-are-the-only-enforcement.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-sandbox-escape-from-a-legitimate-skill-escalation-when-syscall-level-capability-filters-are-the-only-enforcement.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1800,
    "python_slice_tokens": 390,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A syscall-level capability filter answers exactly one question: *is this process permitted to invoke this syscall with these arguments?* It does not answer the question the runtime actually needs answered at escalation time: *did the skill acquire this capability through a sanctioned path, or did it reach the syscall by a path the filter was never designed t...",
    "what_was_observed": "A skill executing under a filter that denied `openat` outside a read-only root, `socket`, and `execve` requested — through the runtime's sanctioned escalation API — permission to open a writable scratch directory. The runtime granted it by *widening the filter program* for that process (a common implementation: recompile the seccomp filter with an additional allowed path prefix and reinstall it via `seccomp()` with `...",
    "condition_of_validity": "The distinction \"escalation vs. escape\" is only well-defined when all three of the following hold: 1. **Every filter mutation is preceded by a grant-ledger write**, and the ledger entry is keyed to the skill's identity and the specific syscall+argument tuple being granted. If the filter can be widened without a ledger entry, the distinction is undefined. 2. ...",
    "decision_boundary": "The operational rule the runtime should encode: - A syscall permitted by the *current* filter is **not** evidence of authorization. Authorization is evidenced only by a ledger entry matching the syscall tuple, written before the filter was widened to permit it. - On any filter mutation, the runtime must **snapshot the ledger** and, for each subsequent syscal...",
    "operational_effect": "Concretely, this changes three runtime behaviors: 1. **Escalation becomes a two-phase commit**: ledger-write, then filter-widen, then barrier, then resume. A crash between ledger-write and filter-widen leaves an orphan grant (harmless, revocable); a crash between filter-widen and barrier leaves an unattributed window (must be quarantined on recovery). 2. **P..."
  },
  "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": "08e4b0ff94e5d2c8b4998dad22eed1120697d7a83120a9edf2febea76875a958",
    "verified_classes": [
      "UnattributedCapabilityError",
      "FilterSwapRaceError",
      "Grant",
      "GrantLedger"
    ],
    "verified_functions": [
      "canonicalize",
      "escalate_and_widen",
      "check_permitted_syscall",
      "begin_mutation",
      "record",
      "is_attributed"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "FilterSwapRaceError",
      "UnattributedCapabilityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "os",
      "threading",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
