Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "warp",
"description": "Native Warp notifications when Claude completes tasks or needs input",
"source": "./plugins/warp",
"version": "2.2.0",
"version": "2.2.1",
"category": "productivity",
"tags": ["notifications", "terminal", "warp"]
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/warp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "warp",
"description": "Warp terminal integration for Claude Code - native notifications, and more to come",
"version": "2.2.0",
"version": "2.2.1",
"author": {
"name": "Warp",
"url": "https://warp.dev"
Expand Down
15 changes: 15 additions & 0 deletions plugins/warp/scripts/emit-terminal-sequence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ _parse_cc_version() {
echo "$1" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1
}

# Returns 0 if we are running inside Claude Code.
#
# The `terminalSequence` output field is Claude Code-specific. Other harnesses
# run Claude Code-format hooks (Codex, for one, maps hooks/hooks.json onto its
# own event names) but reject unknown keys in hook stdout, so emitting it there
# turns every hook into a user-visible error -- e.g. Codex prints
# "hook returned invalid post-tool-use JSON output" on every tool call.
_is_claude_code() {
[ -n "${CLAUDECODE:-}" ] || [ -n "${CLAUDE_CODE_VERSION:-}" ]
}

# Returns 0 if the running Claude Code version supports terminalSequence.
_supports_terminal_sequence() {
local raw="${CLAUDE_CODE_VERSION:-}"
Expand Down Expand Up @@ -82,5 +93,9 @@ emit_terminal_sequence() {
if printf '%s' "$seq" > /dev/tty 2>/dev/null; then
return 0
fi

# No tty and no version. Only gamble on terminalSequence when we can still
# tell we are inside Claude Code; every other harness rejects the field.
_is_claude_code || return 0
jq -nc --arg seq "$seq" '{terminalSequence: $seq}'
}