request-codex-reviewlisted
Install: claude install-skill mistakenot/auto-stack
# Request Codex Review
Send task planning docs to Codex for review, then resolve any comments it leaves.
> Part of the task planning workflow. See [references/workflow-overview.md](references/workflow-overview.md) for the full pipeline.
## Input
- **Task ID** (numeric, e.g. `042`)
- The repository root path (absolute) -- use the current working directory if already at root
## Process
### Step 1: Run Codex Review
Invoke Codex in full-auto mode to review the task docs:
```bash
CWD="<ABSOLUTE_REPO_ROOT>"
TASK_ID="<TASK_ID>"
TASK_DIR=$(find "$CWD/docs/tasks" -maxdepth 1 -type d -name "${TASK_ID}-*" | head -1)
if [ -z "$TASK_DIR" ]; then
echo "no task folder found for ID $TASK_ID"
exit 1
fi
TASK_NAME=$(basename "$TASK_DIR")
LAST_MSG_FILE="/tmp/codex-$TASK_ID-review.txt"
LOG_FILE="/tmp/codex-$TASK_ID-review.log"
codex exec \
--cd "$CWD" \
--full-auto \
-o "$LAST_MSG_FILE" \
"\$review-task $TASK_NAME" \
2>&1 | tee "$LOG_FILE" >/dev/null
CODEX_EXIT=${PIPESTATUS[0]}
echo "codex exit code: $CODEX_EXIT"
```
### Step 2: Check for Comments
Count review comments Codex left in the task docs:
```bash
COMMENT_COUNT=$(rg -n "<!-- (UNRESOLVED|RESOLVED|REJECTED)\(P[123]\):" "$TASK_DIR"/*.md | wc -l)
echo "review comment count: $COMMENT_COUNT"
```
### Step 3: Handle Failure
If Codex exited non-zero or left no comments, inspect the log to diagnose:
```bash
if [ "$CODEX_EXIT" -ne 0 ] || [ "$COMMENT_COUNT" -eq 0 ]; then
echo "codex failed or no comments