Skip to content
Back to skills

Dispatch

ASecurity

Operating contract for delegation lanes — hand several tasks to external executors (codex exec, agy), subagents and Workflows at once while main collects, verifies and merges. Use when the user says "launch in parallel", "split it up", "run a batch", or "start everything you can". Worth reading for a single delegation too, when the call pattern or worktree isolation matters.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 6, 2026
ai-agentsgoshellbashnodegitapi

Works with

  • claude code
  • cli
  • api

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add Dev-Jahn/hippocampus --skill dispatch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dispatch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dispatch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dev-jahn-dispatch/badge)](https://www.skillsdirectory.com/skills/dev-jahn-dispatch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dispatch
description: Operating contract for delegation lanes — hand several tasks to external executors (codex exec, agy), subagents and Workflows at once while main collects, verifies and merges. Use when the user says "launch in parallel", "split it up", "run a batch", or "start everything you can". Worth reading for a single delegation too, when the call pattern or worktree isolation matters.
---

# hippo: dispatch — delegation lanes

Every rule here comes from a dogfooding audit or a measurement. The flags are in `/hippo:hippo`.

## 0. Before launch

1. `hippo prior` — which exec measured better for this kind. Advice, not routing: main decides.
2. `hippo task` — a task with a `waiting on:` line belongs in a later batch.
3. Directives addressed to executors reach every lane through its capsule — **never copy them
   into briefs** (an agy lane has one only where the hippo plugin is installed in agy: §2a). **Grep COMMON against each brief for conflicting clauses** (two contradictory
   GPU clauses once produced a fail-closed NO-GO).
4. Asset preflight: the files, models and data a brief names actually exist.

## 1. Role routing

| Work | Goes to |
|---|---|
| Registry, merge, gate, push, verdicts | main |
| A one-command experiment (soak, bench) | main's `run_in_background` |
| One scoped worker (implement, investigate) | an Agent subagent — `isolation: "worktree"` if it edits |
| A fan-out or a panel read as one result | a Workflow — `isolation: 'worktree'` per editing agent |
| What `hippo prior` or a directive sends to codex | a codex lane (§2); many, `--batch` (§2b) |
| Boundary verification of **another** executor's output | a verification lane (§4) |
| Hard design | an independent duo, synthesized by main |

A subagent, fork or Workflow run — or a Codex `spawn_agent` child — needs no hippo call: the
scribe records it and your verdict (in Claude Code its cost too, as `ag-<agentId>`; a Workflow's
is `ag-<runId>`, its launch's `Run ID: wf_…`, not its Task ID). Never spawn a lane to re-verify
your own work. Do not delegate chores that cost less to do than to brief.

## 2. A codex lane

```bash
hippo dispatch --kind impl --scope "pass2 tensorize" --task feat/x \
  -m gpt-6-sol -c model_reasoning_effort=high \
  -C .claude/worktrees/pass2 --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check \
  "$(cat .hippo/briefs/COMMON.md .hippo/briefs/pass2.md)"
```

- **On Claude Code, launch a single lane through the lane agent**: `Agent(subagent_type:
  "hippo:lane", description: "<scope>", prompt: "<the command above>")` — an agent-panel row
  with the lane's latest command or message (x stops it, recorded), one notification at the
  end: rc, triage, report and raw-log paths, and the resume command when there is one. A
  Workflow script calls it as `agent("<command on one line>", {agentType: 'hippo:lane'})`, no
  schema, when a later step reads the lane's result; many lanes go to `--batch` (§2b). The
  plain Bash form stays for Codex and for a lane launched in a lane.
- **Lane agent prompts** must be the `hippo dispatch …` command alone, including for a batch.
  Anything else is refused. Put the lane's working directory in `-C <dir>` inside the command.
- **`--kind` is the PRIORS axis — reuse a tag**: `impl fix perf verify audit design research
  spike docs infra chore` (one ledger carried 26 tags over 108 dispatches, 19 used once). The
  subject goes in `--scope`.
- **Routing**: `exec = executor/model/effort`; the executor is the agent that did the work
  (`codex agy claude fork subagent workflow`), never how it was launched. Codex ladder, top down:
  `gpt-6.2-astra` > `gpt-6.2-sol` > `gpt-6-luna`; slugs come from
  `~/.codex/models_cache.json`, never guessed. `ultra` is a multi-agent mode — an orchestrator
  lane's tier. An atomized fragment goes cheap; fragmentation exists so the tier can drop.
  `--fast` = codex's fast service tier, same exec axis.
- **Sandbox**: the bypass flag because the lane runs unattended (the worktree makes it safe),
  `--skip-git-repo-check` because the worktree's `.git` is a file. Drop both for read-only lanes.
- The wrapper records the launch, closes stdin, plants `HIPPO_DISPATCH`/`HIPPO_DEPTH`/`HIPPO_DIR`
  and puts its `bin/` first on the lane's PATH: the lane's capsule carries its directives and
  report line; its `log outcome` is a **claim** — the verdict is main's. The plain form runs
  through `run_in_background`, never nohup/disown (orphans) or `> log 2>&1` (raw stderr stays in
  `.hippo/lanes/<id>.log`, the report in `<id>.out`). A killed lane still records rc and usage.
  A codex argument that collides with a wrapper flag goes after `--`.
- A lane never carries your Claude session's variables. **Where `khala` is installed it gets its
  own name** — `KHALA_SESSION` = the `--task` slug (`-2` on a clash, the same on a resume) and
  `KHALA_PARENT` = you, from `khala whoami` — shown as `khala: <name>@<node>` on its launch line,
  in its final lines and in its record: write to that address, and never name the lane itself in
  the brief. The lane's capsule tells it to write to its parent only when it needs a decision or
  is blocked and cannot continue. Progress and results belong in its report, and the relay
  already tells you when it ends. Do put in the brief any peer it should write to (say a Claude
  subagent you give a mailbox with a `KHALA_SESSION=<name>` line; see the khala skill) — it
  sends and replies there directly, without you. The repo's `info/exclude` keeps its
  worktree's `.khala-codex-session` out of commits. **khala says an ended lane has unread letters**: run that lane's `resume:`
  line — it reads them as it starts, under the same name, with you as its parent.
- **Deadlines (Claude Code)**: a background call's `timeout` is its deadline — 30 minutes when
  none is given — so every background `hippo dispatch`, plain form and batch alike, passes
  `timeout: 2147483647` (the lane agent does); the host clamps it to its maximum, 2 hours. A
  lane or a one-row batch that may run past 2 hours needs `BASH_MAX_TIMEOUT_MS` raised in Claude
  Code's environment (settings.json `"env"`), or the host stops it at 2h; in the Workflow face
  each lane has its own deadline.
- `--depth 1` = an orchestrator lane that may spawn; its children start at 0. Lane-origin
  launches pass a dollar breaker ($500 per parent per 24h, `dispatch: {max_wave_usd: N}` in
  `.hippo/config.yaml`); main is never gated.
- **COMMON.md carries only what nothing injects**: the seeded bootstrap and shared task
  background. Never a `bin/hippo` path — cache paths carry the plugin version and the next
  update deletes them.
- **Neutral vocabulary**: GPU memory "overlap", "contamination", "injection" tripped the
  executor's content filter ten times — write safety statements in neutral academic terms.
- **Resume, do not relaunch**: a lane that ended killed, at model capacity or on a
  `transient`/`environment` cause — and any lane with a khala name, however it ended — ends
  with `resume: <command>` — the same codex session as a new dispatch. Run it as printed, or
  swap its closing prompt to steer — in single quotes, or `"$p"` from a single-quoted variable,
  so `$` and backticks stay literal (never `--last` when lanes run in parallel). A resume you
  type yourself (`hippo dispatch -- -C <dir> resume <session> "…"`) may omit `--kind`,
  `--scope`, `--task` and `--depth`: each comes from that session's lane record. A resumed lane
  has no brief of its own, so its triage is weak evidence: read its report. A model-capacity
  error the wrapper resumes by itself, up to 3 times, after 1, 2 and 4 minutes — the stream
  says so as it waits, and `--watch` lists the `attempts:`.

## 2a. An agy lane

`--executor agy` runs the lane on Google's Antigravity CLI instead of codex — when a directive
or `hippo prior` sends the work to a model agy serves (measured on agy 1.5.22):

```bash
hippo dispatch --executor agy --kind impl --scope "pass2 tensorize" --task feat/x -- \
  -C .claude/worktrees/pass2 --model gemini-4-hydrogen --effort low \
  --dangerously-skip-permissions -p "$(cat .hippo/briefs/COMMON.md .hippo/briefs/pass2.md)"
```

Same life-cycle as §2 — lane agent, record, `--watch`, kill, triage, `resume:` line, khala
name — with these differences:

- **Its arguments are agy's own**, after `--`: the prompt in `-p` (any brief is safe, one
  opening with `---` too), the model as `--model <slug>` with `--effort low|medium|high|xhigh|max`
  or the effort in the slug (`gemini-4-hydrogen-low`); slugs come from `agy models`, never
  guessed. `-C <dir>` must come first: agy has no such flag, so the wrapper makes it the lane's
  working directory. `--output-format`, `--input-format` and `-i` are refused — the wrapper
  reads agy's event stream. `--fast` is codex's.
- **Nothing confines it.** agy's `--sandbox` did not stop a write outside the working directory
  or a network call (measured): the worktree is the only isolation, as for a codex lane under
  the bypass flag. Every measured lane ran with `--dangerously-skip-permissions`; what an
  unattended agy does at a permission request without it is unmeasured.
- **A capsule only where the hippo plugin is installed in agy** (`agy plugin list` names
  `hippo`; install: `agy plugin install https://github.com/Dev-Jahn/hippocampus`). There the
  lane starts with the same capsule as a codex lane — executor directives, report line,
  re-delegation clause — once per conversation: a resumed one is not injected again, and agy
  has no injection after a compaction. Without the plugin the lane still gets
  `HIPPO_DISPATCH`/`HIPPO_DEPTH`/`HIPPO_DIR` and `hippo` on its PATH and nothing is injected:
  **then the brief carries what the lane must obey** — the one case where executor-audience
  directives are copied into a brief.
- **The report is the final message**, extracted from agy's last event into `<id>.out` and
  stdout; a run that ends in an error has no report, and the error is on the stream.
  `<id>.log` is agy's raw event stream (JSON lines).
- **One attempt**: no automatic resume at model capacity (no such failure has been observed on
  agy). The `resume:` line works as in §2 and continues the same conversation; a resume you
  type is `hippo dispatch --executor agy -- -C <dir> --conversation <id> -p "…"` and takes
  kind, scope, task, depth, model and effort from the lane record (never `-c`/`--continue`
  when lanes run in parallel).
- Usage is priced when the model's base slug has a row in `prices.yaml`; the plan (§2b)
  suggests no agy model.

## 2b. Batch

For many lanes, hand the fan-out to the wrapper instead of looping launches through your turns
(a 222-lane batch cost $2; the loop driving it by hand ~$13 in context re-feeds).

```yaml
concurrency: 8
defaults: {kind: impl, executor: codex, model: gpt-6-luna, effort: medium,
           briefs: [.hippo/briefs/COMMON.md],
           args: ["--dangerously-bypass-approvals-and-sandbox", "--skip-git-repo-check"]}
entries:
  - {scope: "algo: fenwick tree", brief: .hippo/briefs/fenwick.md, check: "tests/run.sh {test}",
     vars: {test: tests/test_fenwick.py}}
```

- **On Claude Code, one of two ways — never a bare background Bash, never piped through
  `tail`/`head`** (one shell row, nothing visible until the batch ends):
  - *Watched lanes*: `hippo dispatch --batch m.yaml --dry-run`, then the
    `Workflow({scriptPath: "…/m.workflow.js"})` it names — each lane an agent in `/workflows`,
    its progress in that agent's Activity every minute — then `hippo dispatch --batch m.yaml`
    for the harvest (one-row way if a lane failed: the rerun relaunches it first). Cost, in
    relays: zero model calls on the mod path. The Haiku fallback makes additional calls as
    watch windows expire.
  - *A wide batch*: `Agent(subagent_type: "hippo:lane", description: "<batch scope>", prompt:
    "hippo dispatch --batch m.yaml")` — one row (`codex batch · m · 6m02s · 4 running · 12/40
    done · 1 failed · last: …`), one relay for the whole batch, the harvest in its reply (a
    path when long).
  - On Codex: plain Bash, as before.
- **The journal decides**: no journal → everything launches; some entries unfinished → it
  resumes by itself (lanes whose triage named `capability` or `spec` are skipped — they need a
  new brief); all done → nothing launches. Every run ends with the harvest table. Delete the
  journal to start over. A batch lane's `resume:` line runs outside the journal: a rerun still
  relaunches that entry fresh — use one or the other.
- **`--dry-run` is the plan**: difficulty per brief, the suggested exec, notes. An entry with
  no `model` launches on the suggestion when `TYPESAFE_API_KEY` is set; without it, `model` is
  required. The manifest is per-batch data, never standing config.
- Editing entries get worktrees main made first: `-C` in `args`, or `cwd: .claude/worktrees/<id>`.
- **An agy entry** sets `executor: agy` with `model` and `effort` (both required — the plan
  suggests none), agy's own flags in `args` (`["--dangerously-skip-permissions"]`) and its
  directory in `cwd`, never `-C`; §2a's differences apply to it.
- **One batch per stage; main stays between stages.** Do not encode a DAG into one manifest.
- **Mass-identical failures are one defect**: 130 identical check failures were one missing
  `pytest.ini`, paid as 130 repair lanes. Diagnose the cluster, repair it with one brief.
- **Read the harvest table before any lane.** Escalations first, then no-gos. `accept-candidate`
  is not acceptance — it has the standing of a passing check; `verify` says which lanes deserve
  a verification lane. `check` is evidence, never a verdict.
- Serialize verdicts once judged: `hippo log outcome --from-batch <journal> < verdicts.jsonl`
  (`--dry-run` first). Edit the harvest's `verdicts.jsonl` down to the lanes you inspected and
  accepted — never map `rc` or a claim to acceptance. A relaunch mints a new dispatch id.

## 3. Brief contract

(1) A read-first list naming **only files in the worker's tree** (a gitignored document was
once a dead reference). (2) Scope and non-scope. (3) Acceptance pre-registered, RED first, **as
a property, not an implementation instruction** ("fix it like this" made two lanes diverge
over four rounds). (4) Where the report goes, plus a stdout summary. (5) Merge cautions — split
hot files into sections in advance. (6) A verification lane reproduces **in a tempdir only**
("read-only" as an instruction did not prevent contamination).

Early no-go, background-not-sleep, no re-delegation and the report command ride the capsule —
not the brief. Do not pin a base SHA; "your worktree's starting HEAD is the base".

## 4. Verification budget

- Proportional to each exec's refutation rate in PRIORS: a verifier per lane where it is high,
  a spot-check where it is low. No evidence yet → verify the first batch.
- **No severity ceiling in a verifier's brief** — a literal model obeys and reports less. Write
  "report every finding; filtering happens on the collection side" (the harvest ranks them).
- Record `--result refuted --attr work|brief|harness` honestly — a wrong attribution makes the
  priors lie. Acceptance after repair is `revised --rework <n>`.

## 5. Isolation, collection, merge

- Every editing lane gets `.claude/worktrees/<name>` on its own branch, made **before** launch
  and removed **after** the merge (`git worktree add .claude/worktrees/<name> -b task/<name>`;
  an agent's `isolation: "worktree"` makes its own). Copy in untracked build artifacts it needs.
- A killed lane's worktree is inspected (`git log`, `status`) and pushed if worth keeping before
  removal — untracked artifacts were lost once.
- **Disjoint files are not disjoint lanes**: grep the symbols a lane deletes or renames for
  consumers in the other lanes and in dev (symbol coupling once broke all of dev).
- Collect in notification order: report → `git log <base>..HEAD` → `git merge --squash` →
  **re-run the targeted gate** → push.
- **Gate and push are separate calls** — `tail …; git push` pushed a failing state twice.
- While an authoritative measurement runs, main commits nothing to tracked files.
- "Still running" is measured, not inferred: the PID in the process table (`nvidia-smi
  --query-compute-apps` for GPU work), never a worktree commit.

## 6. Shared GPUs

Go through a flock runner at a fixed project path (never a session scratchpad — per-session
copies broke mutual exclusion). No hand-set `CUDA_VISIBLE_DEVICES`; CPU work first, GPU
verification batched. An idle GPU gets assigned by main.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.