Skip to content

Add IPC fallback for Warp notifications#40

Closed
KRRT7 wants to merge 1 commit into
warpdotdev:mainfrom
KRRT7:ipc-fallback
Closed

Add IPC fallback for Warp notifications#40
KRRT7 wants to merge 1 commit into
warpdotdev:mainfrom
KRRT7:ipc-fallback

Conversation

@KRRT7
Copy link
Copy Markdown

@KRRT7 KRRT7 commented May 12, 2026

Teach the Warp Claude Code plugin to prefer WARP_CLI_AGENT_IPC when present and fall back to /dev/tty otherwise. This keeps notifications working with newer Claude Code builds that no longer grant hooks terminal access.

OSC_PAYLOAD=$(printf '\033]777;notify;%s;%s\007' "$TITLE" "$BODY")

if [ -n "${WARP_CLI_AGENT_IPC:-}" ]; then
(printf "%s" "$OSC_PAYLOAD" | nc -U "$WARP_CLI_AGENT_IPC") 2>/dev/null || true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nc -U ships with macOS but is not universally available on Linux (GNU netcat doesn't support -U). Since Claude Code is a Node.js app, node should be guaranteed on $PATH. Could we fall back to node when nc - U fails? Something like:

send_via_ipc() {
    (printf "%s" "$1" | nc -U "$WARP_CLI_AGENT_IPC") 2>/dev/null && return
    node -e "require('net').createConnection(process.argv[1]).end(process.argv[2])" \
        "$WARP_CLI_AGENT_IPC" "$1" 2>/dev/null || true
}

@KRRT7
Copy link
Copy Markdown
Author

KRRT7 commented May 18, 2026

superseded by #52

@KRRT7 KRRT7 closed this May 18, 2026
@KRRT7 KRRT7 deleted the ipc-fallback branch May 18, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants