/deniz-coordination:harnessfrom deniz-coordination
The bundled dispatch harness, which runs a task file on worker models through OpenCode or Codex, fences their writes, escalates their asks to the operator, settles each result from git and its verify commands, and records every step in a ledger. Its commands, task file, modes and write fence, configuration, runs and their recovery, ledger and exit codes.
Ships in deniz-coordination. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The harness runs tasks on worker models out of process, through two equal backends, opencode and Codex. Per task it prepares a workspace, starts the worker behind a write fence where the platform has one, answers or escalates its asks, settles the result from git, runs the verify commands on that result, and records every step in a ledger. This skill is the harness's contract.
contracts, --contract); the harness prepends only
those files, whole, and depends on no other skill.structured tasks owns their prompt and result schema.prepare for dependency steps outside the sandbox: Dependencies and the sandbox.
When a build, test or tool fails under the fence or sandbox, read references/cookbook.md.How the steps of the delegation craft (its worker contract, the worker blocks of any loaded model profiles, and its review rules) map onto the harness:
contracts lists the absolute paths to the craft's references/worker-contract.md
and then the worker file that the model profiles the caller loaded name for the task's model and
role, taken from those profiles' folder. A model or role without a worker file, or a run with no
profiles loaded, gets only worker-contract.md.continueOf: <run>/<task> goes on from its collected work; its
prompt is the amendment. usage sums runs, tokens, cost and duration across the ledgers; give tasks
tags to group them by work item.clean --force removes unmerged and dirty work, so it is a reserved action: run it only on runs you
started, and only on the user's word.routeVerified: true in the task's result; the family claim
of a review rests on it for the author and the reviewer.prepare gets, in the prompt's Environment section in place of the authorized
preparation line: "Dependencies were prepared before you started. Build only with and test only with , inside the sandbox. Adding dependencies is out
of scope; the sandbox already holds what the task needs."From this skill's folder (its global.json selects the SDK), build, then run the command:
dotnet build dispatch.cs
dotnet dispatch.cs -- <command> [arguments]
-- keeps dotnet from taking flags such as --force.--repo, --contract, --ledger); paths in a
task file are relative to that file, except dir (relative to the repository root).
Contract semantics: references/task-file.md#contracts.
In PowerShell use $PWD.ProviderPath.selfcheck [--repo <path>] on a new machine, after an update, and in a new repository. It
checks each backend the configuration selects, or every installed one when none is selected
(version, sign-in, catalog, a clean profile), Windows readiness and every resolved folder, and sends
no prompt. Discovery and exit behavior: references/cli.md.selfcheck, routes, plan, run, status, usage, wait, asks, reply, cancel, collect,
resume, clean. Arguments, output and exit codes of each: references/cli.md.Codex provides an OS sandbox; opencode's Linux/macOS fence is an accident guard, not a security boundary; Windows runs unfenced. Both support structured output. Modes and defaults:
| Setting | Values | Code, mechanical | Review, research | Structured |
|---|---|---|---|---|
profile | clean (minimal profile), full (installed profile) | clean | clean | clean |
project | on (repository context loads), off | on | on | off |
access | read-only, workspace, full | workspace | read-only | read-only |
workspace | worktree (own branch from base), in-place (dir) | worktree | worktree | scratch folder |
profile: clean; explicit profiles at any layer win. A task
that needs the installed profile's tools (MCP servers, plugins, skills) sets profile: full. Codex access: full removes
its sandbox. opencode read-only denies edit and keeps the shell inside the fence; on Windows it also
declines every shell call by default.workspace: in-place runs in dir, main checkout included. commit: none (default) records the
diff without committing; commit: harness requires a clean tree and commits on the current branch.readOnlyShell: decline (default) rejects;
escalate lets a matching rule reach the operator. Reply once permits one command, outside
the sandbox on Codex.once; Codex declines with feedback. Codex denies apply only at
approval: with workspace and network on, a git push deny cannot stop a push.writableRoots (references/config.md). Verify commands
run the worker's code as your user, outside sandboxing, on every backend..dispatch/ < task file < command line. Restrictions
(denies, scope, maximum access, network) only add up, and the route allow-list is the
intersection of the layers that have one. Details: references/config.md.{
"schemaVersion": 2,
"contracts": ["contracts/common.md", "contracts/model.md"],
"tasks": [
{ "id": "fix-guide-typo", "kind": "code", "backend": "codex", "route": "<model>#<effort>",
"base": "<branch>", "promptFile": "fix-guide-typo.md", "scope": ["docs/guide/"],
"verify": ["<build command>", "<test command>"], "timeoutMinutes": 60 }
]
}
kind: code, review, research, mechanical or structured. Each task names a route or an
agent; the harness never uses a backend's default model. Routes: opencode
<provider>/<model>[#<variant>], Codex <model>[#<effort>].scope is required for code and mechanical; two such tasks of one run never share a path
(sharedPaths exempts a path from that overlap check only). A change outside scope fails the task.structured carries input (items, id field) and result (a JSON Schema in the harness's keyword
subset, identity, immutable fields); it never commits or verifies.references/task-file.md.plan <tasks.jsonc> validates the file, contracts, allow-list and live catalog.run <tasks.jsonc> [--run <name>] is the supervisor: it blocks until every task is
final. To keep working meanwhile, start it from a background shell and watch from another one.
A background run wakes you only through a waiter you arm in the same step: your tool's
completion notice for that shell, or wait <run> --timeout <minutes> from another shell after
starting run (the waiter allows two minutes for its ledger to appear). Keep this timeout below
your waiting shell or tool's timeout, and call wait again after exit 3. When you come back to a run without one,
start with status <run>; (no supervisor: …) means nothing is driving it.status <run> shows each task's state, tool count and last tool call. States:
queued, dispatching, running, waiting (escalated ask), settling, interrupted, and the
final done, failed, cancelled. Use wait <run> --timeout <minutes> after starting run to wait
for those final states and print the status summary; choose a timeout below your shell or tool's
timeout and call it again after exit 3. It exits at once if a recorded unfinished run has no
supervisor. Startup grace and waiter exits: references/cli.md.asks [<run>] lists escalated asks; reply <run> <askId> once|reject [--message <text>]
answers one. Answers are one-shot; the harness never grants a standing approval.cancel <run> <task>. Never kill the supervisor.result.json and final.md; a code task adds diff.patch and
verify.log, a structured task deliverable.json instead. These are the evidence; the worker's
final text is not. Layout: references/ledger.md.clean <run> removes worktrees, branches, temporary folders
and backend sessions; unmerged or dirty work stays unless --force.| Code | run |
|---|---|
| 0 | Every task done: verify green, changes in scope, structured deliverable valid |
| 1 | A task failed, was cancelled, is out of scope, or is not final; or the run aborted after it started |
| 2 | Nothing started: missing tool, signed-out backend, invalid task file, existing run id, usage error |
A recorded run is never run again and its ledger is never edited by hand.
status <run> tells a stalled run from a working one: (supervised now) while a supervisor
drives it, (no supervisor: resume <run> settles it) once none does. Check it whenever a run's
completion notice is late or the host killed the shell that waited for it.resume <run> once. It settles what ended
and settles every started Codex task that is not final as lost; fenced opencode tasks whose
server is gone are also lost, never reconstructed. resume <run> --continue re-prompts interrupted
unfenced opencode tasks and starts the tasks that never started.collect <run> <task>.continueOf and make its prompt the amendment.base for a
deliberate fresh start rather than retaining collected work.timeoutMinutes, and the
host's memory must hold maxParallel measured task peaks (config).
Otherwise the host kills the supervisor: resume settles what it left, and Codex tasks that were
running settle lost.selfcheck, plan and run warn when started there (CLI).environment configuration; the harness supplies no
ecosystem switches. See the cookbook. selfcheck warns on a long user
PATH and run refuses a very long one. Do not point DOTNET_CLI_HOME, CODEX_HOME or XDG_DATA_HOME at new folders yourself:
the backends' sign-in lives in their homes.allow rule can run a matching command outside the sandbox without asking. profile: clean drops your own rules; system-level rules always load. plan and result.json
(capabilityNotes) state what still applies to each read-only Codex task.done with an empty diff. The fix belongs in that repository: scope its approval
rules to the session that talks to the user; a dispatched worker runs the task it was given.code task with access: workspace and scope set to the plan path (any change
by a review or research task fails scope).references/config.md.Read on demand: references/guide.md (which setting to choose for a task, why, and what a result
proves), references/task-file.md (every field, default, validation error), references/cli.md
(arguments, output and exit codes), references/ledger.md (run folder, events, fields),
references/config.md (layers, rules, allow-list, locations), references/backends.md (each mode,
rule and limit on opencode and Codex), references/cookbook.md (configuration recipes per ecosystem,
each labelled with where it was tried).
dispatch.cs (opens in a new tab)examples/config.jsonc (opens in a new tab)examples/policy.jsonc (opens in a new tab)global.json (opens in a new tab)references/backends.md (opens in a new tab)references/cli.md (opens in a new tab)references/config.md (opens in a new tab)references/cookbook.md (opens in a new tab)references/guide.md (opens in a new tab)references/ledger.md (opens in a new tab)references/task-file.md (opens in a new tab)src/Backends/Codex/CodexBackend.cs (opens in a new tab)src/Backends/Codex/CodexHome.cs (opens in a new tab)src/Backends/Codex/CodexProcess.cs (opens in a new tab)src/Backends/Codex/CodexProtocol.cs (opens in a new tab)src/Backends/Codex/CodexRpc.cs (opens in a new tab)src/Backends/IWorkerBackend.cs (opens in a new tab)src/Backends/OpenCode/OpenCodeBackend.cs (opens in a new tab)src/Backends/OpenCode/OpenCodeCatalog.cs (opens in a new tab)src/Backends/OpenCode/OpenCodeCollect.cs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/coordinatorUse only when the user, or the brief of a lead the user started, asks you to work as the coordinator or as a lane lead of a task or project. You own the goal, plan the work, hand it to other agents, review what comes back, and carry it through to verified completion with as few questions as possible./delegating-to-worker-modelsUse when you hand off implementation, a plan, research a decision will rely on, or a review, and you brief the worker and check what comes back. A subagent that searches, reads in parallel, or keeps your context small is ordinary tool use. Covers what stays with you, the mechanism, assigning work by strength, the walls preflight, prompts without contradictions, the worker contract, a worker's lifetime (size, usage, restarts, cleanup), evidence from your own run, review, and the fix-up loop.Other plugins' skills for the same job
/model-profilesnpx claudepluginhub blind-striker/agent-skills-and-plugins --plugin deniz-coordination