Warp does not detect `sudo` password prompts
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
- Modify your
/etc/sudoersfile to use a different lecture, always show the lecture, and give password feedback (see above) - Open Warp
- Run
sleep 5; sudo -i - 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
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
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.
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.
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.
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.
i also had this issue, would be great to fix it.
This should be fixed in the next release!