drive-codex-in-herdrlisted
Install: claude install-skill T0mSIlver/skills
# Drive Codex in herdr
Run the **interactive** codex TUI in a background herdr pane and prompt it turn
after turn over one live thread. Use this over `delegate-to-codex` when the work
is conversational, needs approval answers mid-run, or should stay alive after
this session ends. One-shot review or edit work is cheaper with `codex exec`.
Model default: `-m gpt-5.6-sol -c model_reasoning_effort='"high"'`
(`gpt-5.6-luna` + `low` for smoke tests and mechanical work).
## Happy path
1. **Check you are inside herdr.** Everything below talks to the session's
socket; from outside you would be driving someone else's panes.
```bash
test "${HERDR_ENV:-}" = 1
```
2. **Bring up the pane.** `herdr agent start` alone is not enough — see Gotchas
for the races it loses. Use the bundled helper, which splits a background
pane, retries until the shell accepts an agent, starts codex, clears startup
modals, and prints the pane id:
```bash
pane=$(codex-pane-up reviewer "$PWD" \
-m gpt-5.6-sol -c model_reasoning_effort='"high"' -s read-only -a never)
```
Pass `-a never` explicitly: it is what makes `-s read-only` a real boundary
rather than one an approval can step over (see Gotchas).
Edit worker — its own worktree, and a sandbox that can write to it. Resolve
the path before handing it over; `--cwd` should not be relative:
```bash
slug="codex-$(date +%Y%m%d-%H%M%S)"
git worktree add -b "agent/codex/$slug" "../$(basename "$PWD")-$slug"