dispatch-idempotency

A contract for assigning one unique reference to each bounded external send and preventing the same request from being sent twice.

In plain words
What is it for?
Use it before an ADK workflow reaches an external execution boundary, such as sending an action to another system.
Why use it?
It prevents duplicate external actions and rejects reuse of a reference when the request has changed. An approval is still required separately.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/pome223/missionos/dispatch-idempotency
Clone the repo
git clone --depth 1 https://github.com/pome223/missionos
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,199 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01199
Opus 5 $0.00000 $0.00600
Sonnet 5 $0.00000 $0.00240
Haiku 4.5 $0.00000 $0.00120

Measured 2d ago against content hash 5413b5632fcf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dispatch-idempotency scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/dispatch-idempotency.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Dispatch Idempotency Contract

This contract defines the MissionOS dispatch_ref baseline that must be used before an ADK workflow can approach an external execution boundary. It does not give ADK, an LLM, or a completed graph node approval or dispatch authority.

Identity and Request Binding

One dispatch_ref identifies one bounded external send identity. MissionOS binds it to the SHA-256 of the canonical request payload before sender invocation.

  • the same dispatch_ref and the same request hash may return an existing receipt, but may not send again
  • the same dispatch_ref with a different request hash fails closed as dispatch_ref_payload_mismatch
  • a changed action, target, parameter envelope, or Recovery proposal requires a new bounded action, approval, and dispatch_ref
  • ADK event IDs and node IDs are correlation fields only; they are not the idempotency identity

The durable implementation is DispatchAuthorityTable in src/gateway/missionos_dispatch_runtime.py. Authority-token consumption and dispatch idempotency are separate checks. Passing one does not imply passing the other.

Required Sender Sequence

An execution boundary must use this order:

  1. Reload and validate the canonical MissionOS approval, bounded action, deterministic gate, fresh telemetry, backend descriptors, and prior receipts.
  2. Call claim_dispatch_ref() with the stable dispatch_ref and complete canonical request payload.
  3. Stop if send_permitted=false.
  4. If idempotency_status=existing_receipt, return the recorded receipt without invoking the sender.
  5. If idempotency_status=unknown_send_outcome, stop for explicit receipt or external-state reconciliation. Do not retry automatically.
  6. Immediately before invoking the external sender, call mark_dispatch_send_started(). Invoke the sender only when this call returns send_permitted=true.
  7. Record the sender return with record_dispatch_receipt().
  8. Record ACK, observed effect, verifier verdict, and completion in their own canonical evidence stages.

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 127 lines · 0 tokens per session scan A 5413b5632fcf

Subscribe to this mod's changes

dispatch-idempotency is an agent published in the GitHub repository pome223/missionos (2 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,199 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.