selamy-labs/agent-skills/orchestrate-codex
Claude Code and agent skill by selamy-labs/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Reliably launch, supervise, resume, and hand off Codex CLI as an interactive tmux worker. Use for bounded Codex delegation, remote or alternate-user operation, approval recovery, quota routing, and proving a prompt was submitted rather than pasted or queued.
Install
npx vskill@latest install selamy-labs/agent-skills/orchestrate-codexSKILL.md
The same SKILL.md was published earlier as selamy-labs/agent-skills/orchestrate-codex.
Orchestrate Codex CLI
Establish the lane
- Resolve the executable in the target user's login environment with
command -v codex. Readcodex --helpandcodex --versionbefore selecting flags; do not assume another installation's options. - Verify the target OS user, Codex login/profile and quota route, repository, clean exact base commit, and worktree. Give one writer exclusive ownership of each concern.
- Name the tmux session for the repository, task, and date. Record the host, OS user, session, worktree, branch, base SHA, worker role, and permitted paths before launch.
- Put a long directive in a file. Do not interpolate it into nested SSH or shell quoting, and do not put secrets in it. Launch with
scripts/launch_tmux.sh; it reads the file and supplies the complete text as Codex's single initial positional prompt.
Choose model, effort/profile, sandbox, and approval policy from current help and the task. Use --dangerously-bypass-approvals-and-sandbox only with explicit authorization and an externally isolated, correctly scoped worktree. Permission bypass does not broaden the authorized task.
Prove dispatch
Immediately inspect both process and pane:
Confirm the cwd and child argv match the intended executable, flags, and prompt. Handle first-run trust, model, and login screens in the TUI; verify the authenticated identity before proceeding when accounts have different quota or authority.
Treat trust, authentication, retry/fallback, model, and effort choosers as modal state, not as a composer. Inspect the pane before pasting or pressing Enter: Enter can select a fallback or silently change the model/effort instead of submitting the directive. After resolving any such menu, verify the displayed identity, intended model, and intended effort again, then submit with Enter and repeat the full dispatch proof below. Do not continue when the intended runtime selection cannot be proven.
The launcher prints a unique dispatch ID and empty pre-capture path. After resolving trust/auth screens, verify that exact dispatch:
For a follow-up already stored in an absolute-path file, use scripts/submit_followup.sh "$SESSION" "$FOLLOWUP". Using python3 and the bundled scripts/orchestrate_dispatch.py classifier, it checks pre.txt first (exiting 75 if a modal/approval menu or dirty composer blocks input, and also exiting 75 if a modal/approval UI blocks input during paste or submission), sends the directive via bracketed paste (tmux paste-buffer -p), verifies the directive reached the active composer, and classifies wrapped panes into submitted, queued (ORCHESTRATION_ALLOW_QUEUED=1 opts in), accepted_active, unsubmitted, partial_paste, blocked_modal, or ambiguous — sending at most one recovery Enter only when the intact directive remains unsubmitted in an idle composer.
Count work as dispatched only when the verifier finds the unique start and end markers in order (even across soft-wrapped box lines), Codex's exact post-end [dispatch-accepted:...] acknowledgement, fresh Working or tool activity after that acknowledgement, and a new clean › composer (empty or placeholder) after the activity. Generic Working text anywhere else is stale or unrelated evidence and must fail. A marker still held in the active composer or split across regions is not submitted work.
Supervise and recover
Classify every observation explicitly:
- running:
Workingor tool activity advances; - idle/completed: the
›prompt returned after a result; - input-blocked: a question, plan choice, or approval awaits input;
- trust/auth-blocked: setup or login prevents work;
- dead: the pane or process exited.
Answer safe in-scope choices, repair trust/auth under the intended identity, or restart from the recorded lane. Preserve the task ID/name and use the current codex resume semantics from help instead of discarding useful context. Start a fresh task when context has become harmful, carrying forward an explicit handoff rather than an implicit memory dump. Never infer liveness from tmux session existence alone.
Accept the result
Require a handoff containing exact commit/tree/parent, changed paths, tests and gates, clean status, remaining risks, and tmux/task identifiers. Independently inspect the artifact or PR at the exact head. A narrative, green test from another SHA, or an idle pane is not delivery.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/orchestrate-codex/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/selamy-labs/agent-skills/orchestrate-codex)