When the Warp plugin is enabled in Codex CLI, on-stop.sh can exit 0 without writing JSON. Codex 0.153.2 treats that as a failed Stop hook (hook returned invalid stop hook JSON output).
Reproduction outside Warp / without the structured protocol:
printf '%s\n' '{"hook_event_name":"Stop","stop_hook_active":false}' \
| TERM_PROGRAM=cmux CLAUDE_PLUGIN_ROOT="$PWD/plugins/warp" \
bash plugins/warp/scripts/on-stop.sh
Current result: exit 0, zero-byte stdout.
Codex's Stop hook contract requires JSON on stdout for a successful exit. A no-op allow can return:
The same applies to the stop_hook_active=true early return. Redirecting notification-script stdout to stderr also keeps the Stop protocol channel JSON-only.
I verified a local patch that returns {} on every successful non-blocking path: plugins/warp/tests/test-hooks.sh passes 58/58, and a Codex 0.153.2 end-to-end run reports every Stop hook as Completed.
Codex hook reference: https://learn.chatgpt.com/docs/hooks#stop
When the Warp plugin is enabled in Codex CLI,
on-stop.shcan exit 0 without writing JSON. Codex 0.153.2 treats that as a failed Stop hook (hook returned invalid stop hook JSON output).Reproduction outside Warp / without the structured protocol:
Current result: exit 0, zero-byte stdout.
Codex's Stop hook contract requires JSON on stdout for a successful exit. A no-op allow can return:
{}The same applies to the
stop_hook_active=trueearly return. Redirecting notification-script stdout to stderr also keeps the Stop protocol channel JSON-only.I verified a local patch that returns
{}on every successful non-blocking path:plugins/warp/tests/test-hooks.shpasses 58/58, and a Codex 0.153.2 end-to-end run reports every Stop hook as Completed.Codex hook reference: https://learn.chatgpt.com/docs/hooks#stop