Open
Description
Problem
Amazon Q's shell command execution hangs or gets cancelled when executing commands that require interactive input, specifically sudo
commands that prompt for a password. This prevents completion of system administration tasks that are common in development workflows.
Steps to reproduce the issue
- Open Amazon Q chat in VS Code
- Ask Amazon Q to execute a shell command that requires interactive input
- Example: Request to run
sudo chown $USER:$USER some-directory/
- Observe that the command execution either:
- Hangs indefinitely without prompting for password
- Gets cancelled with "Tool use was cancelled by the user" message
- Times out without completing
Expected behavior
The shell execution should either:
- Provide a way to handle interactive prompts (password input)
- Clearly indicate that interactive commands are not supported
- Offer alternative approaches (like suggesting
sudo -n
for non-interactive execution)
Currently, the execution appears to start but never completes, leaving the user uncertain about what happened.
System details
- OS: Windows 11 Pro version 10.0.26100.4351
- Visual Studio Code version: 1.101.1 (system setup)
- AWS Toolkit version: 3.66.0
- Amazon Q version: 1.77.0
Additional Context:
This issue affects common development workflows where system-level permissions are needed, such as:
- Fixing Docker volume mount permissions (
sudo chown
) - Installing system packages (
sudo apt install
) - Modifying system configuration files
- Any command requiring elevated privileges
Workaround:
Users must manually execute these commands in a separate terminal, which breaks the integrated development experience that Amazon Q provides.