codex-workflows
Skill0 starsChanged 15 days agoApache-2.0View on GitHub
Verified headless Codex worktree fan-out. Triggers: codex-workflows, headless Codex, Codex parallel. NOT for healthy cmux single-worker tasks.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- armantark/codex-workflowstheir own version, first seen Jul 25, 2026
- scasella/claude-dynamic-workflows-codextheir own version, first seen Jul 11, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- scasella/claude-dynamic-workflows-codex★ 317same name
- armantark/codex-workflows★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository64 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- verify-lead-waitSkill
- verify-merge-receiptsSkill
- branded-docSkill
- explanatory-docSkill
- 1passwordSkill
- agada-benchSkill
- agent-browserSkill
- agent-routingSkill
- architectural-conformance-auditSkill
- audio-dashboardSkill
- brain-store-fallbackSkill
- claude-desktop-researchSkill
- cmux-agentsSkill
- cmuxSkill
- coachSkill
- coderabbitSkill
- collab-monitorSkill
- content-demo-creationSkill
- convention-auditSkill
- cursor-workflowsSkill
- cyberSkill
- deploy-verifySkill
- drive-filingSkill
- eas-prebuild-checkSkill
- ecosystem-healthSkill
- eli5Skill
- false-green-gateSkill
- figma-loopSkill
- fleet-wrap-gateSkill
- fleet-wrapSkill
- frustration-captureSkill
- gemini-researchSkill
- git-guardianSkill
- github-researchSkill
- golem-installSkill
- grill-meSkill
- heredoc-guardSkill
- html-dashboardSkill
- human-confirm-gateSkill
- i-have-adhdSkill
- install-runbook-linterSkill
- large-planSkill
- m1-window-gateSkill
- model-pin-gateSkill
- never-fabricateSkill
- orcSkill
- plan-councilSkill
- pr-loopSkill
- qa-verdict-gateSkill
- qa-videoSkill
- repogolemSkill
- research-lifecycleSkill
- reviewer-order-gateSkill
- session-handoffSkill
- skill-creatorSkill
- stitch-designSkill
- t3-visualsSkill
- tmp-blockSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill for headless parallel Codex dispatch or when cmux is unavailable.
- Very specific: line 12
Run the harness through scripts/codex-workflows.sh.
- Distinctive: line 41
Treat that token as a secret.
- Very specific: line 53
Use one worktree, branch, and log per worker.
- Very specific: line 55
Verify startup after a grace period.
- Very specific: line 58
Never live-grep a worker stream.
- Very specific: line 67
Treat TASK_DONE as a signal, not artifact proof.
- Distinctive: line 87
Not ignored means every worker's checkout shows up as untracked files in the parent repo and can be committed by accident.
- Distinctive: line 101
Every headless run and worker record must state the same four facts:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codex Workflows
Use this skill for headless parallel Codex dispatch or when cmux is unavailable. Healthy cmux panes remain the default for visible, reachable single-worker tasks; headless mode is a fan-out engine and degraded fallback, not a cmux replacement.
Run the harness through scripts/codex-workflows.sh. Detailed interfaces are in
workflows/agent.md, workflows/parallel.md, and workflows/pipeline.md.
Primitives
agentcreates one isolated worktree, launches one worker, verifies startup, and records it in an explicit manifest.parallelvalidates a JSON fan-out spec, launches every worker before watching, and keeps every outcome in one manifest.pipelineruns ordered stages, parallel within a stage, and stops on failure before the next stage unlesscontinue_on_failureis explicitly enabled.watchobserves process exit first, then parses the finished log once.statusandharvestinspect and collect a completed run. The dispatching lead owns harvesting and retiring its nested.codex-workflowslanes. Nightly GC deliberately excludes.worktrees/.codex-workflows/and$HOME/Gits/worktrees/.codex-workflows/; it is not their backstop. Cleanup uses the workspace retirement guard and records its receipt in the lease ledger. The lead must inventory and preserve artifacts, local history and consumer obligations before authorizing retirement. Harvest alone is insufficient; cleanup is not automatic. Untracked files retain the worktree.
Interrupted cleanup token recovery
Cleanup publishes its private close token atomically in the run directory, outside
the worker worktree. A crash after begin-close returns but before token publication
can leave a lease in closing without a usable token file. Run lease.py audit
--json and inspect that lease's closing_since and closing_age_seconds; it never
expires or releases itself. If the token from the begin-close stdout log was securely
preserved, the operator can run lease.py abort-close --lease-id <id> --close-token
<token> and then reconcile any stale token file before another cleanup attempt.
Treat that token as a secret. The workflow normally captures stdout in memory and
does not create a token log, so it may be unavailable after a crash. If it cannot be
recovered, leave the lease reported as closing; do not auto-release it or delete the
worktree. Inspect and preserve any stale or partial token file before reconciliation;
its presence alone does not prove a complete token was published.
Non-Negotiable Guards
- Discover the real default branch with
git remote show origin. Never assumemainormaster. - Launch
$HOME/.local/bin/codexthrough/usr/bin/nohup. Never invoke barecodex; a captured PID is not a worker. - Use one worktree, branch, and log per worker. Grant workspace-write access to
the repository Git directory and explicit reporting paths with
--add-dir. - Verify startup after a grace period. Report
FAILED_LAUNCHloudly when the process died or launcher diagnostics show an executable, command, or fetch failure. - Never live-grep a worker stream. Wait for process exit, then extract exact
TASK_DONE, PR URLs, and failures from structured finished-log events. - Choose the pin through
agent-routing/references/model-and-effort.md, which owns the routing and escalation rules. When model is omitted, the harness resolvescodex.implementthroughscripts/model-roles.mjs --field model --stable. Installed copies need a linked checkout orGOLEMS_MODEL_ROLES_ROOT=<golems-checkout>; missing registries and unbenched defaults fail closed. Record effective model/effort, output tokens and wall-clock duration in the manifest and run log. - Treat
TASK_DONEas a signal, not artifact proof. Harvest only declared worktree-relative, non-symlink artifacts; do not clean up before harvest.
Worktree Hygiene (folded from superpowers:using-git-worktrees, 2026-09-02)
Guard 3 says one worktree per worker; these two checks say the worktree is safe to
work in. Folded when the superpowers plugin was dropped (XS-2) — source
superpowers/3.4.1/skills/using-git-worktrees/SKILL.md L55-69 and L120-134.
Verify the worktree root is git-ignored BEFORE creating anything in it. Repo law puts worktrees at
<repo>/.worktrees/<name>(AGENTS.md), so the only open question is whether git ignores that path here:# Probe a CHILD path, not the bare root: `.worktrees*/` is a directory-only # pattern, so `git check-ignore -q .worktrees` returns 1 on a fresh checkout # where the directory does not exist yet — a false "NOT ignored". git check-ignore -q .worktrees/probe || { echo ".worktrees NOT ignored"; exit 1; }Not ignored means every worker's checkout shows up as untracked files in the parent repo and can be committed by accident. Fix it (add the line, commit it) before the first
git worktree add, never after. (L55-69)- Prove a clean baseline before the worker implements anything. Run the project's test command in the fresh worktree first and record the result in the manifest. A green baseline is what lets you attribute a later failure to the worker's change; without it you cannot tell a new bug from a pre-existing one. Baseline red is not a blocker by itself — report the failures and get an explicit go/no-go rather than silently building on top of them. (L120-134)
Degraded-Mode Contract
Every headless run and worker record must state the same four facts:
lead-reachable-onlyno-paneno-listen-nameno-self-monitor
Name the dispatching lead. ARM-MONITORS registration must describe the worker as lead-reachable-only; do not invent a pane, listen-name, or monitor.
Completion Interpretation
parallel without --watch proves launch only, records completion_proven:
false, prints LAUNCH_ONLY, and exits 75 so it cannot be mistaken for completed
work. With --watch, success requires every worker to reach completed.
failed_launch, failed, run-level watch_timeout, parser_failed, and incomplete all
return nonzero. A watch timeout preserves the live process and log so another
watch can resume.
See references/manifest.md for states and
references/composition.schema.json for the fan-out/pipeline input contract.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

