codex-worker

Spawn and manage parallel Codex CLI agents in tmux sessions with isolated git worktrees.

6|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/Wyl-cmd/kxns-cli --skill codex-worker-wyl-cmd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-worker
Source: https://github.com/Wyl-cmd/kxns-cli/tree/main/.agents/skills/codex-worker
Command: npx skills add https://github.com/Wyl-cmd/kxns-cli --skill codex-worker-wyl-cmd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Decomposing a large task into independent subtasks is easy, but executing them in parallel with full agent capabilities is hard. This Skill orchestrates multiple Codex CLI agents simultaneously, each running in its own tmux session and isolated git worktree, so batch triage, parallel fixes, and multi-module refactors happen concurrently without branch conflicts. ## Core Features & Use Cases - Parallel Worker Spawning: Launch one Codex agent per subtask, each with its own git branch, worktree directory, and tmux session following a consistent naming convention. - Interactive Multi-Turn Control: Send prompts to running workers via tmux send-keys, peek at output with capture-pane, or attach to a session for hands-on intervention. - Lifecycle Management: List active workers, kill finished sessions, clean up worktrees and branches, and batch-remove dead tmux sessions. - Use Case: When asked to triage all GitHub issues updated in the last 7 days, fetch the issue list and spawn one codex worker per issue, each analyzing root causes and proposing fixes in its own worktree. ## Quick Start Ask the agent to split the current task into independent subtasks and spawn a codex worker for each one in parallel using tmux and git worktrees.

Frequently Asked Questions about codex-worker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run multiple Codex CLI agents in parallel?

Create a git worktree and branch per subtask, then launch each Codex agent in a detached tmux session pointed at its worktree. Send prompts with tmux send-keys after waiting about 5 seconds for the Codex TUI to initialize.

How do I send a prompt to a running Codex agent in tmux?

Use tmux send-keys -t <session> "your prompt" Enter after the TUI initializes. If the prompt stays in the input field without submitting, send an additional Enter keystroke to the same session.

What are the requirements for using codex-worker?

The codex CLI must be installed and logged in, tmux must be available, and the project must be a git repository. Verify with command -v codex, codex login status, and command -v tmux before spawning workers.

When should I use codex exec instead of interactive tmux sessions?

Use codex exec only when you do not need follow-up interaction, such as CI pipelines or one-shot analysis with output written to a file via -o. It does not support multi-turn dialogue, unlike interactive tmux sessions.

How do I clean up codex worker sessions and worktrees?

Kill the tmux session with tmux kill-session, remove the worktree with git worktree remove, and delete the branch with git branch -d. Dead sessions can be batch-removed by filtering tmux list-sessions for pane_dead status.