aws / aws/aws-toolkit-vscode

Shell execution hangs on interactive commands (sudo, password prompts)

Open
#7,547 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

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

1. Open Amazon Q chat in VS Code
2. Ask Amazon Q to execute a shell command that requires interactive input
3. Example: Request to run `sudo chown $USER:$USER some-directory/`
4. 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.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in Amazon Q chat in VS Code with the reported sudo command and observe whether it hangs, is cancelled, or times out. Trace the shell execution path from that request; done means interactive commands are handled clearly or their unsupported status and alternatives are communicated without leaving execution unresolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell, typescript, vscode
Domain
devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.