From 02ccdfc0de669666375d1f4a89e541f2ecfd9c8e Mon Sep 17 00:00:00 2001 From: Damon Janis <310342+damonjanis@users.noreply.github.com> Date: Fri, 17 Apr 2026 21:40:24 +0930 Subject: [PATCH] Add WARP_PLUGIN_DISABLE_PROJECT env var to skip project field When the 'project' field is included in the payload, Warp uses it to label the CLI agent's tab. That's useful by default, but it fights with users who rename their tab explicitly (e.g. via Claude Code's /rename, or a tmux/window title they've set by hand), because the plugin fires on every prompt submit and re-sends project = basename(cwd). Setting WARP_PLUGIN_DISABLE_PROJECT=1 omits the field so Warp falls back to whatever title is already set. Default behavior is unchanged. --- plugins/warp/scripts/build-payload.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/warp/scripts/build-payload.sh b/plugins/warp/scripts/build-payload.sh index 9ad610e..dd9bfca 100644 --- a/plugins/warp/scripts/build-payload.sh +++ b/plugins/warp/scripts/build-payload.sh @@ -39,8 +39,11 @@ build_payload() { local session_id cwd project session_id=$(echo "$input" | jq -r '.session_id // empty' 2>/dev/null) cwd=$(echo "$input" | jq -r '.cwd // empty' 2>/dev/null) + # Allow users to suppress the auto-derived project field so Warp doesn't + # override a tab name that the user (or another tool) has set explicitly. + # Set WARP_PLUGIN_DISABLE_PROJECT=1 to opt out. project="" - if [ -n "$cwd" ]; then + if [ -n "$cwd" ] && [ -z "${WARP_PLUGIN_DISABLE_PROJECT:-}" ]; then project=$(basename "$cwd") fi