warp-notify.sh fails silently: /dev/tty not accessible from Claude Code hook subprocesses
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Inspect warp-notify.sh, focusing on the existing printf to /dev/tty used by the hook notifications. Reproduce a PermissionRequest or Stop event on macOS, then verify that the process-tree TTY lookup delivers the OSC 777 notification while retaining the fallback when no writable TTY is found.
Written by the indexing model from the issue text.
Description
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
PermissionRequestorStophook 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-warpv2.0.0
- Dominant language
- Shell
- Stars
- 231
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from warpdotdev/claude-code-warp
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
warpdotdev/claude-code-warp#63 · 2 comments ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
warpdotdev/claude-code-warp#61 · 5 comments · 3 reactions ·
All issues in warpdotdev/claude-code-warp
Similar issues
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oSoWoSo/vOid_Community_repOsitory#148 · 1 comment ·
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 91/100
alunduil/alunduil-chezmoi#792 ·
-
area: compat bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
zenhub-dev
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenLiberty/ci.docker#747 ·