fix: respect CLAUDE_CODE_DISABLE_TERMINAL_TITLE in UserPromptSubmit hook#33
Open
Saradhii wants to merge 1 commit into
Open
fix: respect CLAUDE_CODE_DISABLE_TERMINAL_TITLE in UserPromptSubmit hook#33Saradhii wants to merge 1 commit into
Saradhii wants to merge 1 commit into
Conversation
When CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 is set, omit the query field from the prompt_submit payload so Warp does not overwrite the user's tab title. The notification still fires for session status transitions. Fixes warpdotdev#24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1environment variable in theUserPromptSubmithookqueryfield from theprompt_submitpayload so Warp does not overwrite the user's custom tab titleProblem
Users who set
CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1to opt out of terminal title updates still had their tab title overwritten by the plugin'sUserPromptSubmithook, because the env var was not checked before sending the prompt text to Warp.Changes
on-prompt-submit.sh: CheckCLAUDE_CODE_DISABLE_TERMINAL_TITLEafter extracting the query. If set to1, clear the query and conditionally build the payload args so thequeryfield is entirely omitted (not just empty string).test-hooks.sh: Add tests verifying query is present without the env var, query is absent withCLAUDE_CODE_DISABLE_TERMINAL_TITLE=1, and the event type is stillprompt_submit.Test plan
bash plugins/warp/tests/test-hooks.sh— 0 failuresFixes #24