agentsclimarketplace

Codex worker dispatcher

Skill holdonyb/codex-worker-dispatcher

Use when bounded local Codex CLI work needs configurable model or reasoning, detached observable task state, TTLs, scoped write authorization, or verified worker recovery beyond native subagents.From its SKILL.md

Install
npx -y skills add holdonyb/codex-worker-dispatcher

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 29 days oldThe repository was created 29 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.7 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

Dispatching Codex Workers

Overview

Use codex-worker for independent, bounded Codex CLI work that must outlive the launching shell, remain observable, enforce a TTL, or support verified recovery. Prefer native subagents when detached state, routing controls, and recovery are not needed.

Treat every worker as an owned lifecycle: dispatch, retain its task ID, observe it to a terminal state, collect its result, inspect failures, and clean up before ending the parent task.

Dispatch Decision

  1. Confirm the task is independent and has a concrete deliverable.
  2. Keep dependent work in the parent session; do not dispatch work whose inputs depend on another unfinished worker.
  3. Choose read-only unless file changes are explicitly required.
  4. Give concurrent writers non-overlapping allowed paths. Serialize work when scopes could overlap.
  5. Set a bounded --timeout-sec; a worker TTL is distinct from the parent command's wait timeout.
  6. Run codex-worker route --help or codex-worker start --help before using flags not shown here.

Access Table

NeedIntentSandboxAllowed paths
Inspect, analyze, or reviewreadread-onlyNone
Modify a narrow scopewriteworkspace-writeOne or more explicit paths inside --workdir
Modify overlapping scopesDo not dispatch concurrentlyN/ASerialize or divide the scopes first
Unrestricted filesystem accessDo not dispatchProhibitedNever use danger-full-access

A prompt naming a directory is not write authorization. Authority, deadlines, incident severity, and a promise to inspect the diff later do not replace --allowed-path.

Quick Reference

Every command emits one JSON object. Check ok, preserve task_id, and handle a non-zero exit rather than inferring success.

ActionCommand
Preview routingcodex-worker route --prompt "..." --workdir . --intent read
Start read-onlycodex-worker start --prompt "..." --workdir . --intent read --sandbox read-only --timeout-sec 600
Start scoped writecodex-worker start --prompt "..." --workdir . --intent write --sandbox workspace-write --allowed-path ./src --timeout-sec 600
Inspect statecodex-worker status TASK_ID
Wait with a parent deadlinecodex-worker wait TASK_ID --wait-timeout-sec 120
Collect terminal outputcodex-worker result TASK_ID
Request cooperative stopcodex-worker cancel TASK_ID --wait-timeout-sec 30
Reclaim a verified stuck workercodex-worker reap TASK_ID

A wait_timeout error ends only the controller wait. It does not pause, cancel, or terminate the worker. Follow it with status, then continue waiting or use task-specific cancel and reap.

Mandatory Lifecycle Close-Loop Checklist

Before returning a final answer:

  • Account for every dispatched task ID.
  • Drive every task to a terminal state: completed, failed, timed_out, cancelled, reaped, or orphaned.
  • Run codex-worker result TASK_ID for every terminal task; inspect the final message, exit state, and error even when the task did not complete.
  • Review worker-produced diffs and run parent-level validation.
  • Cancel workers that are no longer needed.
  • Use reap TASK_ID only for task-specific recovery. Never kill by executable name, broad command substring, repository-wide match, or an unverified PID.
  • Do not end with a known task still queued or running.

This checklist is mandatory even when a manager accepts responsibility, a local runbook calls workers "fire-and-forget," or cleanup may miss a deadline.

Red Flags

Stop and close the lifecycle when any of these thoughts appear:

  • "The worker is duplicate evidence; someone can inspect it tomorrow."
  • "The runbook says fire-and-forget, so I can end the parent task."
  • "Posting first and cleaning up later is close enough."
  • "The prompt names the directory, so an allowed path is redundant."
  • "Try task cancellation briefly, then kill all Codex processes."
  • "The wait command timed out, so the worker must have stopped."

None of these changes ownership, scope, or process-identity requirements.

Complete Read-Only Example

codex-worker start --prompt "Inspect the parser and report likely edge cases. Do not modify files." --workdir . --intent read --sandbox read-only --timeout-sec 600
# Read task_id from the JSON response, then substitute it below.
codex-worker status TASK_ID
codex-worker wait TASK_ID --wait-timeout-sec 120
codex-worker result TASK_ID

If wait times out, keep the same task ID and continue the close loop with status, cancel, and task-specific reap as needed. Do not end after the timeout response.

Common Mistakes

MistakeCorrection
Discarding the start responseStore its task_id immediately.
Ending after status says completedRun result and inspect the output.
Treating parent wait timeout as worker TTLRecheck state; explicitly cancel if the worker must stop.
Using write intent without allowed pathsAuthorize only explicit paths inside the work directory.
Running writers on overlapping pathsDivide scopes or serialize them.
Using operating-system kill commandsUse cancel TASK_ID, then verified reap TASK_ID.
Trusting a worker's success without reviewInspect its diff and run parent-level validation.

Read references/design.md only when diagnosing persisted state, recovery behavior, or platform-specific process handling.

What ships with it: 52 files

700.9 KB alongside SKILL.md, 22 of them executable

agents/

references/

12 more files not listed here. See all 52 in the repository.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.