warp-notify.sh prints "/dev/tty: Device not configured" when invoked without a controlling TTY
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Start with scripts/warp-notify.sh, especially the /dev/tty write described as line 21, and reproduce with the provided nohup command using stdin from /dev/null. Done means no stderr warning when no controlling TTY is present, while notification delivery remains unchanged when a writable TTY exists.
Written by the indexing model from the issue text.
Description
Summary
scripts/warp-notify.sh (v2.0.0) writes OSC 777 sequences directly to /dev/tty. When the hook runs in a subprocess that has no controlling terminal — which is common for hooks dispatched by Claude Code (e.g. on Notification, PostToolUse, Stop) — the redirect itself fails before printf's 2>/dev/null can take effect, surfacing as a spurious bash: line 21: /dev/tty: Device not configured in the host UI. Exit code stays 0, so the user only sees the warning.
Reproduction
On macOS, with the plugin enabled and a Warp build that supports OSC 777 (should_use_structured returns true):
nohup bash ~/.claude/plugins/cache/claude-code-warp/warp/2.0.0/scripts/warp-notify.sh "test" "body" </dev/null
→ stderr contains bash: line 21: /dev/tty: Device not configured even though the script otherwise exits 0.
Root cause
> /dev/tty 2>/dev/null only suppresses printf's stderr. The shell-level redirection failure (opening /dev/tty for writing when there is no controlling TTY) is reported on the shell's stderr, before any of the redirections on the printf command apply.
Proposed fix
Guard the write with a writability test. Drop-in replacement for line 21:
if [ -w /dev/tty ]; then
printf '\033]777;notify;%s;%s\007' "$TITLE" "$BODY" > /dev/tty 2>/dev/null || true
fi
This silences the warning for invocations without a TTY (which legitimately can't deliver the notification anyway) while preserving the existing behaviour when a TTY is present.
Environment
- macOS 26 (Tahoe), zsh
- Warp
v0.2026.04.29.08.57.stable_01,WARP_CLI_AGENT_PROTOCOL_VERSION=1 - Plugin
claude-code-warpv2.0.0 - Claude Code (CLI)
Happy to open a PR with the change if useful — let me know.
- 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 ·