Visible-Agent-Loop-Protocol

Dispatch Receipts And Evidence Gates

Dispatch success must be proven.

Text appearing in an input box is not delivery.

Receipt States

dispatch_written
dispatch_inserted
dispatch_submitted
dispatch_completed
dispatch_blocked

State Meanings

dispatch_written
Dispatch file exists and was surfaced visibly.
dispatch_inserted
Text was inserted into an agent pane or input box. This is not delivery.
dispatch_submitted
Runtime proved the message was submitted.
dispatch_completed
Expected evidence appeared.
dispatch_blocked
Submission or completion could not be proven.
dispatch_completed for controlling-agent self-work
If the controlling agent is also the implementer, it must not paste its own dispatch prompt into its live context. The adapter may append dispatch_completed for that agent only after the expected task-local evidence exists, and the receipt should state that self-work was tracked through compact evidence files.

Gate Rule

If expected evidence is declared, the gate requires:

dispatch_completed

dispatch_submitted is not enough when evidence is expected.

For Full Mode and Remote Mode, dispatch_completed also needs runtime submission provenance. Each selected agent must have a prior dispatch_submitted receipt with concrete adapter proof, for example a submission id, queue id, hosted run id, pane/session submit proof, or equivalent runtime record. A dry-run dispatch, a local sub-agent result, a simulated review, or a manually appended dispatch_completed receipt is not HERDR/live runtime proof.

Because the ledger is append-only, validators must evaluate the latest receipt for each selected agent. A historical dispatch_completed does not satisfy the gate if a later receipt for the same agent is dispatch_blocked, dispatch_inserted, or only dispatch_submitted. If late evidence appears after a timeout, the runtime must append a newer dispatch_completed receipt that points to the recovered evidence.

If an evidence file exists but is marked invalid, superseded, rejected, or blocked in evidence-status.json, it does not satisfy dispatch_completed or the expected evidence gate.

Expected evidence refs must be task-relative safe paths. They must be non-empty POSIX-style relative paths and must not be absolute paths, contain backslash separators, or include .. path segments. Evidence outside the task folder cannot satisfy dispatch_completed.

Receipt Ledger

Receipts are appended to:

.herdr-loop/tasks/<task-id>/dispatch-receipts.jsonl

Every non-empty JSONL line must parse as a JSON object. A corrupted receipt ledger is an audit failure, even if earlier valid lines look complete.

Example:

{
  "ts": "2026-07-03T00:00:00Z",
  "agent": "claude",
  "event": "dispatch_completed",
  "exit_code": 0,
  "dispatch_ref": "agents/claude/dispatch.md",
  "expected_refs": ["agents/claude/visible-review.md"],
  "proof": {
    "runtime_state": "completed",
    "evidence_found": true
  },
  "summary": "Expected dispatch evidence exists"
}

Manual Mode

Manual Mode may record:

manual_dispatch_written
manual_delivery_attested
manual_result_attested
manual_blocked

These are useful audit records, but they are not equivalent to Full Mode runtime receipts. A Manual Mode task can be complete as a manual evidence trail, but it must not label manual attestation as dispatch_submitted.