Symptom
When scripts/on-prompt-submit.sh (and other hooks invoking warp-notify.sh) run in a non-interactive context — e.g., a Claude Code hook chain without a controlling terminal — the redirect to /dev/tty in warp-notify.sh produces a shell-level diagnostic that the inline 2>/dev/null cannot suppress:
warp-notify.sh: line 21: /dev/tty: Device not configured
This surfaces in Claude Code as UserPromptSubmit hook error: Failed with non-blocking status code: No stderr output on every user prompt.
Repro
echo '{"hook_event_name":"UserPromptSubmit","session_id":"x","cwd":"/tmp","prompt":"t","agent_name":"a"}' \
| CLAUDE_PLUGIN_ROOT=/path/to/warp/2.0.0 \
bash /path/to/warp/2.0.0/scripts/on-prompt-submit.sh
Observed: shell diagnostic on stderr, exit 0, surfaced as hook error in Claude Code.
Environment
- macOS (Darwin)
- Claude Code, plugin version 2.0.0
(A working local patch and proposed fix follow as a comment so the issue body stays a stub.)
Symptom
When
scripts/on-prompt-submit.sh(and other hooks invokingwarp-notify.sh) run in a non-interactive context — e.g., a Claude Code hook chain without a controlling terminal — the redirect to/dev/ttyinwarp-notify.shproduces a shell-level diagnostic that the inline2>/dev/nullcannot suppress:This surfaces in Claude Code as
UserPromptSubmit hook error: Failed with non-blocking status code: No stderr outputon every user prompt.Repro
Observed: shell diagnostic on stderr, exit 0, surfaced as hook error in Claude Code.
Environment
(A working local patch and proposed fix follow as a comment so the issue body stays a stub.)