lat-dispatch

A workflow for sending development tasks to other coding agents and waiting for their results. It supports built-in agents and external command-line clients, which are programs controlled from a terminal.

In plain words
What is it for?
Use it for specification, planning, implementation, review, testing, and other staged workflows involving multiple coding agents.
Why use it?
It keeps multi-agent work organised by choosing the right worker, waiting correctly, and handling completion, monitoring, and recovery.

Skill for Claude CodeCodex

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 skills/ouob-tw/loopagentteams/lat-dispatch
Any agent
npx skills add ouob-tw/LoopAgentTeams --skill lat-dispatch
Clone the repo
git clone --depth 1 https://github.com/ouob-tw/LoopAgentTeams

Made for: Claude Code, Codex.

Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,871 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.00040 $0.09871
Opus 5 $0.00020 $0.04935
Sonnet 5 $0.00008 $0.01974
Haiku 4.5 $0.00004 $0.00987

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

Security

Grade A, and why

lat-dispatch 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.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/monitor-session.sh, scripts/run-exec-client.sh, tests/exec-client-test.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

lat-dispatch/SKILL.md · 360 lines

How it starts

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

LAT Dispatch

Client 設定

可用 client、指令格式、解析優先序、內建預設、config.yaml 格式參見 references/clients.md

內建 Subagent 路由與等待

  • 每個委派階段先解析目標 client,再比較 Dispatch 宿主與目標模型家族;同宿主使用內建 subagent,跨宿主才使用外部 CLI client。
  • 同宿主派發時讀取 references/native-subagents.md;跨宿主才讀取 references/clients.md 的 CLI 啟動、Monitor 與恢復章節。
  • Codex 呼叫 GPT/Codex worker 時使用內建 spawn_agent,再以 wait_agent 直接等待完成通知或 mailbox 更新。
  • Claude Code 呼叫 Claude worker 時使用內建 Agent;前景直接等完成,背景等待 completion notification 或使用 blocking TaskOutput
  • 內建 subagent 等待期間不得固定輪詢 subagent 狀態。等待明確逾時或異常時只做一次診斷;worker 仍在執行且無確認錯誤時,重新進入 blocking wait。
  • 各 phase 的等待分流一致:內建 subagent 直接等待完成通知;外部 CLI 才啟動 Monitor。
  • 內建 subagent 不啟動 CLI、zmx、PID file、Session JSONL Monitor。收到完成通知後仍依角色契約處理 Final Answer、review adjudication、executor ledger 與 QA evidence。
  • 外部 CLI 的啟動、監控、恢復與錯誤處理維持 references/clients.md 的既有契約。

Available scripts

  • scripts/monitor-session.sh — 監控 Codex/Claude 原始 Session JSONL 並提取最新 turn 的 Final Answer
  • scripts/run-exec-client.sh — exec launcher:啟動 exec client、保存精確 PID、將 FD1/FD2 捕捉為帶 UTC capture time 的 runtime logs、等待退出並清理 PID file

預設流程

使用者啟動 LoopAgentTeams 時,自動執行,僅在 spec 階段需使用者確認(依 spec_review_flow):

進度檢查清單 — 每次啟動 LoopAgentTeams 時建立追蹤,逐項完成後才進入下一階段:

- [ ] init:建立 `.lat/logs/` 與 `.lat/workspace/`,遷移舊全域 ledger
- [ ] spec:腦力激盪 → 草稿/確定 TASK_ID → 初始化 task workspace 與空 ledger → 審查(依 spec_review_flow)→ 使用者確認
- [ ] plan:產生計劃 → 審查迴圈 → 規格與計劃一起提交
- [ ] dispatch:驗證既有 `.lat/workspace/<TASK_ID>/` ledger → 附加 code task → 啟動 code_executor
- [ ] monitor:內建 subagent 等待完成通知/外部 CLI 監控原始 Session JSONL → 將 Final Answer 交給 Dispatch;executor 另確認 task ledger
- [ ] test:test_executor 寫+跑整合與 E2E 測試修到綠 → qa_executor 依 QA 清單寫驗收測試至 qa_e2e/ → 失敗回饋 test_executor 修,迴圈到全過或達上限
- [ ] report:`clean <TASK_ID>` 清理已完成的 task-scoped zmx sessions → 向使用者報告最終狀態
  • 每個階段轉換以一句話報告進度。
  • 不得推斷完成狀態。 只有實際執行該階段的檢查步驟後,才可勾選完成。
  • 不得跳步。 除非使用者明確要求跳過特定步驟。

外部 CLI Monitor 完成契約

  • 外部 CLI 執行監控時從本技能目錄呼叫 scripts/monitor-session.sh;不要在 prompt 或臨時 shell 中重寫監控迴圈。client 啟動與 session 定位方式見 references/clients.md。內建 subagent 不使用本節 Monitor。
  • Codex 監控只傳 agent_id 時由腳本自動定位 JSONL;定位 STALL 時,Dispatch 擴大搜尋並人工確認後,以 --jsonl-path "$JSONL_PATH" 重啟 Monitor。
  • Claude exec 與 TUI 都監控 Project transcript;最新人類 prompt 之後的 assistant text 加 stop_reason: "end_turn" 表示該 turn 完成,last-prompt 不得視為完成標記。
  • Codex exec 與 TUI 都監控原生 Session JSONL;同一 turn 必須同時有 response_itemphase: "final_answer"event_msg.payload.type: "task_complete""turn_complete"
  • COMPLETED 只代表最新 turn 已輸出 Final Answer 並結束,不代表 exec OS 程序已 EOF/退出或 exit code 為 0。
  • Codex 最新 turn 已有 task_completeturn_complete 卻沒有 Final Answer 時,Monitor 立即回報 INCOMPLETE;Dispatch 不得從 rollout 欄位猜測原因,須依 references/clients.md 先驗證帳號配額,再檢查 client 對應的診斷來源。
  • Monitor 不建立、自訂或重新導向 exec log;四種 client 模式皆直接讀 CLI 原始 Session JSONL,並將 Final Answer 原文交給 Dispatch Agent。
  • 監控來源的修改時間有變動表示仍有活動,超過該階段 stall 秒未變才回報 STALL
  • review 階段的內建值為 stall: 600drift: 1800;同一 client turn 的初次 Monitor 與 re-arm 必須重用同一組已解析值。
  • Claude Code Dispatch 呼叫 Monitor 時固定使用 timeout_ms: 3600000persistent: true;生命週期由 bundled script 的終端事件控制。
  • 單一 STALL 只觸發診斷,不授權 kill。exec 依 references/clients.md 使用啟動時保存的 PID;TUI 仍使用 zmx session handle。
  • spec_reviewerplan_writer 與非 self 的 plan_reviewer 不寫 task ledger;內建 subagent 以完成通知交回 Final Answer,外部 CLI 由 Monitor 交回 Final Answer。self plan_reviewer 不委派 agent,也不寫 task ledger。
  • code_executortest_executorqa_executor 不論使用 exec 或 tui,都須寫 .lat/workspace/<TASK_ID>/results.yaml 並更新同目錄 tasks.yaml 的精確 agent_id 狀態。流程狀態以 ledger 為準,Final Answer 僅供摘要與診斷。
  • ledger 出現結果不能單獨代表 turn 已完成;executor 還須收到內建 subagent 完成通知或外部 Monitor COMPLETED,才能進入下一階段。

Read the full file on GitHub · 360 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 · 360 lines · 40 tokens per session scan A ada6e333e1ed

Subscribe to this mod's changes

lat-dispatch is a skill published in the GitHub repository ouob-tw/LoopAgentTeams (7 stars, last pushed 21d ago), licensed MIT. It adds 40 tokens to every session and 9,871 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

spec-flow-setup

Set up or repair this repo's spec-flow contract — run init, fill the fields it could not read, make the test command emit a report the engine can read, and prove the result with a green check. Use when a repo has no .spec-flow/config.json, when init left MISSING or REVIEW lines, when a run refuses to start because the…

IgnacioMarin402/spec-flow-plugin · 96 tokens

engine-comments

Decide where a piece of reasoning belongs when writing or editing this engine — an invariant beside the code, a transition in the commit message, or a decision in decisions/. Use when adding a comment or a file header to hooks/, scripts/, commands/ or agents/, when a header has grown past what a reader needs, or when…

IgnacioMarin402/spec-flow-plugin · 74 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

gsd-audit-milestone

Audit milestone completion against original intent before archiving.

open-gsd/gsd-core · 17 tokens

spec-kitty-charter-doctrine

Run charter interview, generation, context, and sync workflows for project governance in Spec Kitty 3.x. Access doctrine artifacts programmatically via DoctrineService. Resolve agent profiles. Load action-scoped governance context iteratively, not all at once. Triggers: "interview for charter", "generate charter"…

Priivacy-ai/spec-kitty · 135 tokens

conductor-implement

Executes the tasks defined in the specified track's plan. Use this to start or continue working on a feature, bug fix, or chore.

gemini-cli-extensions/conductor · 34 tokens