Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Warp does not detect `sudo` password prompts

Open Samasaur1 opened this issue 2 years ago • 3 comments

Discord username (optional)

No response

Describe the bug

I have the "Receive desktop notifications from Warp" feature on, with both the long commands and password prompt options enabled. I receive notifications for long-running tasks, but Warp seems unable to detect when I am prompted for a password.

I have customized the sudo prompt, and I believe this is the root cause of the issue (since the feature works on another machine that has not had its prompt customized). The changes I have made are to set a new lecture, show the lecture every time, and show password feedback:

diff --git a/sudoersl b/sudoers
--- a/sudoers
+++ b/sudoers
@@ -22,7 +22,10 @@ Defaults	env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
 Defaults	env_keep += "EDITOR VISUAL"
 Defaults	env_keep += "HOME MAIL"
 
-Defaults	lecture_file = "/etc/sudo_lecture"
+# Defaults	lecture_file = "/etc/sudo_lecture"
+Defaults	lecture_file = "/etc/sudo_lecture_bee"
+Defaults	lecture = always
+Defaults	pwfeedback
 
 ##
 # User alias specification

I suspect that Warp is detecting password prompts by the terminal not echoing characters sent to it, but I'm reporting a bug anyway in case it is fixable.

To reproduce

  1. Modify your /etc/sudoers file to use a different lecture, always show the lecture, and give password feedback (see above)
  2. Open Warp
  3. Run sleep 5; sudo -i
  4. Switch the focus away from Warp within 5 seconds

Expected behavior

Warp should pop up a notification informing me that my terminal is waiting for password input

Screenshots

Screenshot 2023-07-20 at 9 57 59 AM

Operating system

MacOS

Operating system and version

Ventura 13.4.1 (c) (22F770820d)

Shell Version

GNU bash, version 5.2.15(1)-release (aarch64-apple-darwin22.3.0)

Current Warp version

v0.2023.07.11.08.03.stable_00

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

N/A, the issue only applies to a Warp specific feature. (i.e. Warp AI, Workflows)

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

None

Samasaur1 avatar Jul 20 '23 17:07 Samasaur1

Thanks for letting us know @Samasaur1 We'll post any updates on this thread.

To anyone else facing this issue, please add a 👍 to the original post at the top or comment with your details, and subscribe if you'd like to be notified.

warpdotdev-devx[bot] avatar Jul 26 '23 20:07 warpdotdev-devx[bot]

Hey @Samasaur1 So I was able to do some testing and found that the culprit for this issue is the Defaults pwfeedback, so as a workaround, I recommend you comment that line out, although you'll lose the asterixis as you type the password, you should still get the notifications for the time being.

warpdotdev-devx[bot] avatar Jul 26 '23 20:07 warpdotdev-devx[bot]

My problem is that it will execute a query command that doesn't require my approval, but put a sudo in it. The Warp terminal doesn't give you a way to see that the prompt is there and it doesn't seem to take it blindly, so you have to Ctrl-C out. Then the AI says, "Be sure to watch for the password prompt!" then hides it again.

cmpalmer66 avatar Jun 13 '25 23:06 cmpalmer66

Same here. For example if you ask the agent to install nodejs, it will run:

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -

But got stuck due to password prompts.

tete1030 avatar Jun 23 '25 07:06 tete1030

i also had this issue, would be great to fix it.

elliottash avatar Jul 17 '25 13:07 elliottash

This should be fixed in the next release!

peicodes avatar Nov 17 '25 17:11 peicodes