Skip to content

Commit bc80ff4

Browse files
authored
Merge pull request #5 from warpdotdev/harry/app-3620-get-claude-code-plugin-working-over-ssh
trust protocol version declaration instead of term program to get plugin working over ssh and stopped for legacy users
2 parents abcb3b2 + e4364ba commit bc80ff4

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

plugins/warp/scripts/on-session-start.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ EOF
1111
exit 0
1212
fi
1313

14+
if [ -z "$WARP_CLI_AGENT_PROTOCOL_VERSION" ]; then
15+
cat << 'EOF'
16+
{
17+
"systemMessage": "⚠️ Please update Warp to get agent notifications — your terminal does not declare cli-agent protocol support"
18+
}
19+
EOF
20+
exit 0
21+
fi
22+
1423
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1524
source "$SCRIPT_DIR/build-payload.sh"
1625

plugins/warp/scripts/warp-notify.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
# For structured Warp notifications, title should be "warp://cli-agent"
66
# and body should be a JSON string matching the cli-agent notification schema.
77

8-
# Only emit notifications when running in Warp.
9-
# Otherwise, folks that use warp _and_ another terminal will get
10-
# garbled notifications whenever they run claude elsewhere.
11-
if [ "$TERM_PROGRAM" != "WarpTerminal" ]; then
8+
# Only emit notifications when Warp declares protocol support.
9+
# This avoids garbled OSC sequences in non-Warp terminals
10+
# (and works over SSH where TERM_PROGRAM isn't propagated).
11+
if [ -z "$WARP_CLI_AGENT_PROTOCOL_VERSION" ]; then
1212
exit 0
1313
fi
1414

0 commit comments

Comments
 (0)