self-dispatch-test

A nondestructive command that checks whether OpenCode, a coding-agent host, can dispatch read-only worker tasks to itself. It tests both supported communication methods and reports structured results.

In plain words
What is it for?
Use it after configuring Goal Flight for OpenCode, before unattended execution, or when checking self-dispatch support. It reports whether OpenCode and its worker communication components are ready.
Why use it?
It finds setup or readiness problems before unattended agent work begins, without editing queues or creating commits. This reduces the risk of discovering a dispatch failure during a larger run.

Command

Part of the goal-flight plugin — 10 skills, 17 commands, 3 hooks shipped together

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 commands/simonrowland/goal-flight/self-dispatch-test
Clone the repo
git clone --depth 1 https://github.com/simonrowland/goal-flight

Or install goal-flight, the plugin that ships this one along with the rest of its 10 skills, 17 commands, 3 hooks.

Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 779 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.00013 $0.00779
Opus 5 $0.00006 $0.00390
Sonnet 5 $0.00003 $0.00156
Haiku 4.5 $0.00001 $0.00078

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

Security

Grade A, and why

self-dispatch-test 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 3d 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.

commands/self-dispatch-test.md · 83 lines

How it starts

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

self-dispatch-test

Verify the current host can act as a Goal Flight orchestrator and dispatch read-only OpenCode workers to itself on both supported transports (ACP and bash-tail). This is the OpenCode-specific form of the orchestrator generalization check in AGENTS.md.

Read:

  • protocols/dispatch-routing.md
  • protocols/worker-markers.md
  • docs/hosts/opencode.md

When to invoke

  • User asks to verify OpenCode self-dispatch, orchestrator generalization, or "can goal-flight dispatch workers from OpenCode?"
  • After ./setup.sh --apply --yes --opencode on a new machine.
  • Before unattended execute on OpenCode when worker readiness is unknown.

Orchestrator steps

  1. Confirm Goal Flight is loaded (AGENTS.md → host skill → repository SKILL.md).

  2. Run the procedural harness (read-only; no queue edits, no commits):

source ~/.config/rpp/litellm.env   # when using litellm/* models
python3 <skill-root>/scripts/hosts/opencode/self_dispatch_test.py --json
  1. Summarize only the JSON fields into the conversation:
Field What to report
ok overall pass/fail
doctor.opencode_present / doctor.acp_sdk_ok host readiness
capacity.opencode_acp / capacity.opencode_bash_tail headroom
transports.acp.state / text_excerpt ACP worker outcome
transports.bash_tail.complete_marker bash-tail watcher saw COMPLETE:

Do not paste raw tail files or full doctor JSON.

  1. If ok is false:
  • skipped: true → missing opencode/LiteLLM; surface install steps from docs/hosts/opencode.md and stop.
  • ACP failed, bash-tail passed → cite transports.acp.error; ACP is the default worker path.
  • bash-tail failed, ACP passed → cite transports.bash_tail.error; execute can still use ACP.
  • Both failed → run python3 <skill-root>/scripts/goalflight_doctor.py --project-root "$PWD" --json and fix host install before execute.

What this proves

  • Orchestrator preflight (doctor + capacity) runs from the OpenCode host.
  • OpenCode can spawn itself as an ACP worker via goalflight_acp_run.py.
  • OpenCode can spawn itself as a bash-tail worker via scripts/hosts/opencode/bash_tail.py and the standard watch-dispatch-tail.sh watcher.

Read the full file on GitHub · 83 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. 3d ago First seen · 83 lines · 13 tokens per session scan A 1dc6c26e8c2b

Subscribe to this mod's changes

self-dispatch-test is a command published in the GitHub repository simonrowland/goal-flight (20 stars, last pushed 5d ago), licensed MIT. It adds 13 tokens to every session and 779 once invoked, about $0.0001 per session on Opus 5. 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-30.