Skip to content

warp-notify.sh emits 'device not configured' diagnostic when /dev/tty is unavailable in hook context #53

@drewdrewthis

Description

@drewdrewthis

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions