Summary
The warp-notify.sh script writes OSC 777 escape sequences to /dev/tty, but Claude Code runs hook scripts in subprocesses that are detached from the controlling terminal. This causes a silent failure (/dev/tty: Device not configured), meaning no notifications are ever delivered despite the plugin being correctly installed and enabled.
Steps to Reproduce
- Install the plugin:
/plugin install warp@claude-code-warp
- Trigger a
PermissionRequest or Stop hook event in Claude Code
- No Warp notification appears
Root Cause
Claude Code spawns hook scripts in a subprocess context where /dev/tty is not accessible (ENXIO — device not configured). The script's fallback || true suppresses the error, so nothing is logged and the notification silently fails.
The hooks are invoked correctly — verified by adding temporary file logging. The failure is specifically in the printf ... > /dev/tty call inside warp-notify.sh.
Fix
Walk up the process tree from the hook script to find the first ancestor that has a writable TTY, then write the OSC sequence directly to that TTY device (e.g. /dev/ttys006):
FOUND_TTY=""
CHECK_PID=$$
for _ in 1 2 3 4 5; do
CHECK_PID=$(ps -o ppid= -p "$CHECK_PID" 2>/dev/null | tr -d ' ')
[ -z "$CHECK_PID" ] && break
CANDIDATE=$(ps -o tty= -p "$CHECK_PID" 2>/dev/null | tr -d ' ')
if [ -n "$CANDIDATE" ] && [ "$CANDIDATE" != "??" ] && [ -w "/dev/$CANDIDATE" ]; then
FOUND_TTY="/dev/$CANDIDATE"
break
fi
done
if [ -n "$FOUND_TTY" ]; then
printf '\033]777;notify;%s;%s\007' "$TITLE" "$BODY" > "$FOUND_TTY"
else
printf '\033]777;notify;%s;%s\007' "$TITLE" "$BODY" > /dev/tty 2>/dev/null || true
fi
This replacement for the existing printf ... > /dev/tty line in warp-notify.sh fixes all hook notification types on macOS. The original /dev/tty fallback is retained for cases where the process tree walk doesn't find a TTY.
Environment
- macOS 15.4 (Darwin 25.4.0)
- Warp
v0.2026.05.06.15.42.stable_04
- Claude Code with plugin
warp@claude-code-warp v2.0.0
Summary
The
warp-notify.shscript writes OSC 777 escape sequences to/dev/tty, but Claude Code runs hook scripts in subprocesses that are detached from the controlling terminal. This causes a silent failure (/dev/tty: Device not configured), meaning no notifications are ever delivered despite the plugin being correctly installed and enabled.Steps to Reproduce
/plugin install warp@claude-code-warpPermissionRequestorStophook event in Claude CodeRoot Cause
Claude Code spawns hook scripts in a subprocess context where
/dev/ttyis not accessible (ENXIO — device not configured). The script's fallback|| truesuppresses the error, so nothing is logged and the notification silently fails.The hooks are invoked correctly — verified by adding temporary file logging. The failure is specifically in the
printf ... > /dev/ttycall insidewarp-notify.sh.Fix
Walk up the process tree from the hook script to find the first ancestor that has a writable TTY, then write the OSC sequence directly to that TTY device (e.g.
/dev/ttys006):This replacement for the existing
printf ... > /dev/ttyline inwarp-notify.shfixes all hook notification types on macOS. The original/dev/ttyfallback is retained for cases where the process tree walk doesn't find a TTY.Environment
v0.2026.05.06.15.42.stable_04warp@claude-code-warpv2.0.0