aws / aws/amazon-q-developer-cli
Q CLI returns incomplete output without indicating truncation when use_aws returns large output
- 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
Linux
### Expected behaviour
When the tool output exceeds the configured maximum and is truncated (e.g., appends `... truncated`), the Q CLI should explicitly state that the output was truncated.
### Actual behaviour
Asking Amazon Q Developer CLI to “list EC2 instances” triggers the use_aws tool to run aws ec2 describe-instances.
If the command’s output is large (~20KB), the tool truncates the output and appends `... truncated`.
code: https://github.com/aws/amazon-q-developer-cli/blob/5acd7e3f3c4607380b4424cfa70147eaf93183a0/crates/chat-cli/src/cli/chat/tools/use_aws.rs#L87
The Q CLI (model: Claude Sonnet 4) then formats and returns an incomplete instance list without warning that truncation occurred. This leads users to believe the list is complete.
### Steps to reproduce
In Amazon Q Developer CLI, ask: List all my EC2 instances.
Ensure the account/region has enough instances (more than 50) to produce >20KB of output from aws ec2 describe-instances.
Observe the internal tool call to aws ec2 describe-instances. The tool response contains `... truncated` at the end (output trimmed due to size).
The Q CLI composes a response that shows a partial list of instances but does not state that the underlying tool output was truncated.
### Environment
```yaml
```
Contributor guide
Assessment
This issue has not been assessed yet.