From claude-commands
Runs a cmux terminal auto-approver that scans terminal surfaces for approval dialogs, classifies them with codex exec, and sends the matching key. Use when testing or debugging the launchd-based worker.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-commands:cmux-codex-autoapproveThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Canonical files:
Canonical files:
$HOME/.claude/skills/cmux-codex-autoapprove$HOME/.claude/skills/cmux-codex-autoapprove/scripts/cmux_codex_approve_launchd.py$HOME/Library/LaunchAgents/com.$USER.cmux-codex-approve.plist~/.claude/skills/cmux-codex-autoapprove/com.$USER.cmux-codex-approve.plistOn a new machine, copy the plist and load it:
cp ~/.claude/skills/cmux-codex-autoapprove/com.$USER.cmux-codex-approve.plist \
~/Library/LaunchAgents/com.$USER.cmux-codex-approve.plist
launchctl load ~/Library/LaunchAgents/com.$USER.cmux-codex-approve.plist
PATH requirement: The plist must include $HOME/bin in PATH (where cmux lives). Current plist already has this.
$HOME/.claude/supervisor/cmux-codex-launchd.log$HOME/.claude/supervisor/cmux-codex-launchd-state.jsonCompatibility paths:
$HOME/.claude/bin/cmux_codex_approve_launchd.py$HOME/.codex/skills/cmux-codex-autoapproveUse this skill for a custom cmux auto-approver that:
cmux --json tree --allcmux read-screencodex exec for a one-token decision: ENTER, 1, y, SKIP, or DENYcmux send or cmux send-keyThis is the non-snap-agent-supervisor path.
cmux --json tree --all
cmux read-screen --workspace <workspace> --surface <surface> --lines 24
/opt/homebrew/bin/python3 $HOME/.claude/skills/cmux-codex-autoapprove/scripts/cmux_codex_approve_launchd.py
launchctl kickstart -k gui/501/com.$USER.cmux-codex-approve
launchctl print gui/501/com.$USER.cmux-codex-approve
codex exec is only called when the screen looks like a real approval dialog.Edit the worker script when:
launchd can detect candidates but hangs or times out during classificationPattern wiring rule (mandatory): Detection regexes in this worker are checked at
two call sites — is_approval_candidate() (the gate) and heuristic_decision()
(the action). A pattern added to heuristic_decision() but not is_approval_candidate()
will silently fail because the gate drops it first. When adding a detection regex or
phrase, you MUST add test strings to both functions. The test file at
scripts/test_approval_patterns.py enforces this by running every dialog through both
functions — it will fail if a pattern is only wired into one.
Check these first when debugging:
$HOME/.claude/supervisor/cmux-codex-launchd.log$HOME/.claude/supervisor/cmux-codex-launchd.stderr.log$HOME/.claude/supervisor/cmux-codex-launchd-state.jsonnpx claudepluginhub jleechanorg/claude-commands --plugin claude-commandsOrchestrates terminal panes, spawns Claude/Codex sub-agents, sends keys between surfaces, reads pane output, and manages browser/markdown panes via cmux CLI. Replaces plain bash for parallel multi-pane workflows.
Controls cmux terminal multiplexer: splits panes, launches/monitors sub-agents and collects results, sends commands/keys, reads screens, sends notifications. Activates when CMUX_* env vars are set.
Controls cmux tabs, workspaces, and terminal panes via Unix socket. Use for reading terminal output, sending commands to another agent's pane, switching tabs by name, and monitoring coder progress.