aws / aws/amazon-q-developer-cli

Prompts for the user input get cutoff

Open
#1,161 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### Operating system

macOS 15.3.2 (24D81)

### Expected behaviour

Running commands that require input from the user like y/n or some other text input cause q cli to get stuck and in most cases the message of the prompt is cutoff and not actually displayed in terminal.

Example:
```
% q chat -a 'run `read -p "Continue? (y/n): " ans && [[ $ans == [Yy] ]] && echo "You chose yes!" || echo "You chose no!"`'

Hi, I'm Amazon Q. Ask me anything.

Things to try
• Fix the build failures in this project.
• List my s3 buckets in us-west-2.
• Write unit tests for my application.
• Help me understand my git status

/acceptall Toggles acceptance prompting for the session.
/profile (Beta) Manage profiles for the chat session
/context (Beta) Manage context files for a profile
/help Show the help dialogue
/quit Quit the application

> run `read -p "Continue? (y/n): " ans && [[ $ans == [Yy] ]] && echo "You chose yes!" || echo "You chose no!"`

This command creates a simple prompt that asks you to continue with a yes/no question. Let me
execute it for you:

Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command:
read -p "Continue? (y/n): " ans && [[ $ans == [Yy] ]] && echo "You chose yes!" || echo "You chose no!"

Executing `read -p "Continue? (y/n): " ans && [[ $ans == [Yy] ]] && echo "You chose yes!" || echo "You chose no!"`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
```

### Actual behaviour

Same as above, but show the prompt to the user

```
Continue? (y/n):
```

### Steps to reproduce

```
q chat -a 'run `read -p "Continue? (y/n): " ans && [[ $ans == [Yy] ]] && echo "You chose yes!" || echo "You chose no!"`'
```

### Environment

```yaml
[q-details]
version = "1.7.2"
hash = "b6bf5f1675dd7395009e8bc65c1145820671f211"
date = "2025-03-21T01:36:16.66764Z (20d ago)"
variant = "full"

[system-info]
os = "macOS 15.3.2 (24D81)"
chip = "Apple M3 Pro"
total-cores = 12
memory = "36.00 GB"

[environment]
cwd = "/Volumes/Development"
cli-path = "/Volumes/Development"
os = "Mac"
shell-path = "/Users/USER/.toolbox/tools/toolbox/1.1.1762.0/toolbox-exec"
shell-version = "5.9"
terminal = "macOS"
install-method = "toolbox"

[env-vars]
PATH = "/Users/USER/.rbenv/shims:/Users/USER/.rbenv/bin:/Users/USER/.rbenv/shims:/Users/USER/.local/bin:/Users/USER/.nvm/versions/node/v20.19.0/bin:/Users/USER/.local/share/mise/installs/node/18.20.2/bin:/Users/USER/.local/share/mise/installs/python/3.12.9/bin:/Users/USER/.local/share/mise/installs/python/3.11.11/bin:/Users/USER/.local/share/mise/installs/python/3.10.16/bin:/Users/USER/.local/share/mise/installs/python/3.9.21/bin:/Users/USER/.local/share/mise/installs/python/3.8.20/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/USER/.cargo/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/USER/.toolbox/bin:/Users/USER/Library/Android/sdk/emulator:/Users/USER/Library/Android/sdk/platform-tools:/Users/USER/Library/Android/sdk/emulator:/Users/USER/Library/Android/sdk/platform-tools:/Users/USER/Library/Android/sdk/tools:/Users/USER/Library/Android/sdk/platform-tools:/Users/USER/Library/Android/sdk/emulator:/Users/USER/Library/Android/sdk/tools:/Users/USER/Library/Android/sdk/platform-tools:/Users/USER/.toolbox/bin"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.apple.Terminal"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.