{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-unsafe-tool-call-sequences-when-agent-state-is-only-partially-observable",
  "title": "Which invariants prevent unsafe tool-call sequences when agent state is only partially observable",
  "date_of_record": "2026 November 14",
  "scope": "Applies to safety-critical agents whose tool calls mutate external state (filesystems, payment rails, infrastructure control planes) and whose verifier observes only the tool-call trace plus a sampled state projection, not the full ground-truth state. Does not apply to agents operating in fully observable, transactional sandboxes where every mutation is reflected atomically in the verifier's view.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-unsafe-tool-call-sequences-when-agent-state-is-only-partially-observable.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-unsafe-tool-call-sequences-when-agent-state-is-only-partially-observable.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-unsafe-tool-call-sequences-when-agent-state-is-only-partially-observable.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1593,
    "python_slice_tokens": 325,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The load-bearing distinction is between **trace invariants** (properties over the ordered sequence of tool calls, checkable from the log alone) and **state-transition invariants** (properties over the actual world state before and after each call). Most verification suites conflate these because in a fully observable system they coincide: if the trace says `...",
    "what_was_observed": "In a deployment where an agent issued `delete_resource` and `create_resource` calls against a shared registry, the verifier enforced a trace invariant: *no `delete` on resource R may be followed by a `create` on R without an intervening `confirm_owner(R)` call.* The trace was clean. Every delete was followed by a confirm before the recreate. The verifier passed the run. The state transition that actually occurred: th...",
    "condition_of_validity": "A trace invariant is valid as a safety guarantee only when the following holds for every tool call in the sequence: the state projection used by the verifier at call time is **fresh** (bounded staleness below the mutation-to-read window) and **complete** (every field the invariant quantifies over is present, not defaulted). Formally, for a trace invariant `I...",
    "decision_boundary": "The decision boundary is whether the verifier can observe the post-condition of a call through a channel that is causally downstream of the mutation and not served from a cache that predates it. If yes, enforce the state-transition invariant directly and treat the trace invariant as a redundant fast-path. If no, the agent must be constrained so that the unsa...",
    "operational_effect": "The operational consequence is that verification coverage must be reported as a pair — `(trace_invariants_enforced, state_invariants_witnessed)` — and a run where the second set is empty must be flagged as *unverified*, not *passed*. In the registry incident, the run was reported as passed because the verifier's output schema had a single boolean. Adding the..."
  },
  "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": "7a3199bc3cd8210f87105241a2a507f8cd0fb92e89f2a006e8e82ba521c14783",
    "verified_classes": [
      "StaleAuthorizationWitnessError",
      "Witness"
    ],
    "verified_functions": [
      "require_fresh_witness",
      "guard_delete_then_create"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleAuthorizationWitnessError"
    ],
    "sample_fail_closed_invariants": [
      "no witness: confirm step is trace-decoration, not a gate"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
