aws / aws/amazon-q-developer-cli

Q CLI sometimes likes to repeat itself twice or thrice, doing git commands like commit multiple times, adding a pipe to head that doesn't appear to add any value

Open
#1,873 1 comment 0 reactions 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.4.1 (24E263)

### Expected behaviour

That when Q CLI decides to commit a change or grep, or other commandline, it won't do it more than once unless it somehow expects different results which it should explain in the Purpose.

### Actual behaviour

Snippet, with internal references redacted.

```
🛠️ Using tool: execute_bash

● I will run the following shell command:
cd ... && git add ... && git commit -m "..."

↳ Purpose: Committing the updated ...kt file

Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]:

> y
[mainline a2a5b1c] ...
1 file changed, 4 insertions(+), 2 deletions(-)


● Completed in 0.87s

🛠️ Using tool: execute_bash

● I will run the following shell command:
cd ... && git add ... && git commit -m "..." | head -10

↳ Purpose: Committing the updated ...kt file

Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]:

> n you're done with this

```

### Steps to reproduce

Not sure exactly what it takes to reproduce. It seems to appear more often in longer running Q sessions.

### Environment

```yaml

[q-details]
version = "1.10.1"
hash = "cb90e381cf8391beef4b966623d913e258cbb08d"
date = "2025-05-16T13:53:39.016927Z (9h ago)"
variant = "full"

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

[environment]
cwd = "/Volumes/workspace/swift/src/AVSwiftDataTypes"
cli-path = "/Volumes/workspace/swift/src/AVSwiftDataTypes"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "macOS"
install-method = "brew"

[env-vars]
PATH = "/Users/USER/.toolbox/bin:/opt/homebrew/opt/python3@/libexec/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:/Users/USER/.local/bin"
QTERM_SESSION_ID = "c8eb36c30cb34f84a1a0b3be901c8297"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.9.1"
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.