/selamy-skills:orchestrate-codexfrom selamy-skills
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.
Ships in selamy-skills. 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; scripts run unread.
command -v codex. Read codex --help and codex --version before selecting flags; do not assume another installation's options.scripts/launch_tmux.sh; it reads the file and supplies the complete text as Codex's single initial positional prompt.scripts/launch_tmux.sh \
lane-repo-codex-task-YYYYMMDD /absolute/worktree /tmp/task.prompt \
"$(command -v codex)" --model MODEL
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.
Immediately inspect both process and pane:
tmux list-panes -t lane-repo-codex-task-YYYYMMDD \
-F '#{pane_pid} #{pane_current_path} #{pane_current_command} #{pane_dead}'
PANE_ID=$(tmux list-panes -t '=lane-repo-codex-task-YYYYMMDD' -F '#{pane_id}' | head -n 1)
tmux capture-pane -p -J -t "$PANE_ID" -S -120
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:
scripts/verify_dispatch.sh "$SESSION" "$DISPATCH_ID" "$PRE_CAPTURE"
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.
Classify every observation explicitly:
Working or tool activity advances;› prompt returned after a result;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.
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.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub selamy-labs/agent-skills --plugin selamy-skills111 skills in this plugin
/adaptive-estimationUse when tracking a slowly-varying latent quantity from noisy measurements with quantifiable uncertainty — a drifting metric, capacity, latency trend, or confidence. Prefer a Kalman-style adaptive estimator over fixed moving averages or static thresholds./adaptive-loop-budgetingUse when an autonomous loop needs explicit limits on attempts, time, cost, tool calls, verification depth, or risk, and a clear stop, continue, yield, or escalate decision./adopt-and-deleteUse when adopting a shared module, library, chart, or service, or doing any consolidation, migration, or refactor that supersedes existing code. The change that adds the replacement must REMOVE what it replaced, in the same atomic change.Other plugins' skills for the same job