Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Notifications via OSC 777 don't work when Claude Code runs hooks in a non-TTY subprocess

Abierto
#36 2 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
shell
Área
cli, devtools

Línea de trabajo

Start with warp-notify.sh and its should_use_structured() path, then reproduce a Stop, PromptSubmit, or PostToolUse hook under the non-TTY Claude Code subprocess conditions described. Compare the proposed notification transports and establish which one the project will implement; done means notifications reach Warp from these hooks without relying on the subprocess TTY.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem

The Warp plugin for Claude Code sends terminal notifications using OSC 777 escape sequences
(\033]777;notify;...) written directly to /dev/tty. However, Claude Code executes hook scripts as
child subprocesses that are not attached to a TTY — their stdin/stdout/stderr are all
redirected (stdin → /dev/null, stdout/stderr → temp files).

As a result, all notification writes fail silently:

  1. printf '...' > /dev/tty → No such device or address
  2. >&2 (stderr fallback) → captured by Claude Code harness, never reaches terminal
  3. >&1 (stdout fallback) → same, captured
  4. || true → all errors swallowed silently

Reproduction

  1. Install Warp terminal + Claude Code with the claude-code-warp plugin
  2. Run any task in Claude Code
  3. The Stop/PromptSubmit/PostToolUse hooks fire, but no notification appears in Warp

Environment

  • Warp: v0.2026.04.29.08.57.stable_02
  • WARP_CLI_AGENT_PROTOCOL_VERSION=1
  • WARP_CLIENT_VERSION=v0.2026.04.29.08.57.stable_02
  • Platform: Windows 11 (WSL/MINGW64)
  • Claude Code hook subprocess: stdin→/dev/null, stdout→temp file, stderr→temp file

Root Cause

Claude Code's hook execution model redirects all FDs of child processes. OSC 777 sequences written by
the hook subprocess cannot reach the Warp terminal because:

  • The subprocess has no TTY of its own
  • stdout/stderr are piped to Claude Code's internal harness, not to the terminal

Proposed Solutions

Option 1: Warp CLI notification command (recommended)

Provide a warp notify (or similar) CLI command that hook subprocesses can invoke. The CLI
communicates with the Warp terminal via IPC/shared memory to deliver the notification, bypassing the
TTY requirement entirely.

# Instead of:
printf '\033]777;notify;...' > /dev/tty

# Use:
warp notify --title "Task Complete" --body "..."

Option 2: Claude Code host forwards OSC sequences

Claude Code's main process (which IS connected to the Warp terminal via the Warp pipe) could parse
hook subprocess stderr output for OSC 777 sequences and forward them to the terminal.

Option 3: Use Claude Code's built-in notification mechanism

If Claude Code exposes a structured way for hooks to request notifications (e.g., via JSON output with
 a notification field), Warp could handle rendering those directly.

Additional Context

The warp-notify.sh script already handles version detection and graceful fallback via
should_use_structured(), so the notification infrastructure is sound — it just needs a transport
mechanism that works from non-TTY subprocesses.
Lenguaje dominante
Shell
Estrellas
234
Forks
60
Merge medio
2 d 8 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de warpdotdev/claude-code-warp

Todos los issues de warpdotdev/claude-code-warp

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.