| name | pw-go |
| description | Request a capability-safe executor handoff from a durable Prewalk Stop checkpoint. |
$prewalk:pw-go - hand off to the executor
Inspect the live spawn_agent schema first. Pass the field names it actually
exposes to the state transition helper, then follow its output exactly:
python3 hooks/_pw.py go "${CODEX_THREAD_ID:-${CODEX_SESSION_ID:-}}" \
--schema-fields=task_name,message,fork_turns,model,reasoning_effort
Omit any field name that is absent from the live schema. Do not claim support
from a preset or documentation; only the current tool schema is proof.
If no active checkpoint exists, report that in one line and stop.
Native spawn path
- If the helper reports an unsupported route, do not spawn. The durable
checkpoint remains ready for diagnosis or recovery.
- When routing is supported, call
spawn_agent exactly once with the helper's
generated task_name, the exact text between PREWALK_MESSAGE_BEGIN and
PREWALK_MESSAGE_END as message,
fork_turns: "none", and the configured executor model. Include
reasoning_effort only when the helper prints it. Do not use a named plugin
agent and do not alter the message.
- Wait for the bound executor. Codex hooks bind the agent ID returned by this
exact tool call and consume only that agent's
SubagentStop marker.
Do not run manual confirm/complete commands. Spawn denial, failure, interruption,
missing markers, and incomplete markers remain durable for pw-retry recovery.