Skip to content

Commit 5fe323a

Browse files
committed
feat(overlay): desktop notification via OSC 777 before overlay prompt
1 parent 15890d3 commit 5fe323a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

hooks/handlers/pre-tool-use.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,10 @@ export PASSTHRU_OVERLAY_TOOL_NAME="$TOOL_NAME"
751751
export PASSTHRU_OVERLAY_TOOL_INPUT_JSON="$TOOL_INPUT"
752752
export PASSTHRU_OVERLAY_CWD="$CC_CWD"
753753

754+
# Send a desktop notification so the user knows a permission prompt is waiting.
755+
# OSC 777 is supported by Ghostty, iTerm2, and other modern terminals.
756+
printf '\033]777;notify;passthru;permission prompt: %s\a' "$TOOL_NAME" 2>/dev/null || true
757+
754758
# Invoke the overlay and capture its exit code. We have an ERR trap in place
755759
# (converts unexpected errors to fail-open passthrough), so we cannot rely on
756760
# `set +e` alone: the trap fires on any non-zero exit regardless. Disable the

0 commit comments

Comments
 (0)