aws / aws/amazon-q-developer-cli
/compact runs into Amazon Q ValidationException: Improperly formed request
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
### Checks
- [ ] 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
- [ ] I have run `q doctor` in the affected terminal session
- [ ] I have run `q restart` and replicated the issue again
### Operating system
macOS 15.4.1 (24E263)
### Expected behaviour
Error when running /compact after running /context show and some mcp calls
Amazon Q should process the request properly and provide a response without validation errors.
### Actual behaviour
Amazon Q is failing with a ValidationException error:
- Error code: "ValidationException"
- Error message: "Improperly formed request."
- AWS request ID: "c7b8027f-4a75-406d-ad02-2c43209d8cca"
- Location: /private/tmp/788abf33-519d-4264-918b-e563eeb425ff/crates/q_chat/src/lib.rs:1015
```
[chat-transcript]
I can provide you with a list of the tools I have available to assist you. Here are the tools I can use:
1. **GitHub Tools**:
- Create, update, and manage issues and pull requests
- Get file contents, push files, and create branches
- Search code, manage repositories, and review pull requests
2. **AWS Tools**:
- Make AWS CLI API calls to various AWS services
3. **Elasticsearch Tools**:
- List, create, update, and delete indices
- Search, index, and delete document
> /context show
> /compact
Amazon Q is having trouble responding right now:
0: unhandled error (ValidationException)
1: service error
2: unhandled error (ValidationException)
3: Error { code: "ValidationException", message: "Improperly formed request.", aws_request_id: "c7b8027f-4a75-406d-ad02-2c43209d8cca" }
Location:
/private/tmp/788abf33-519d-4264-918b-e563eeb425ff/crates/q_chat/src/lib.rs:1015
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
> /help
> /compact
Amazon Q is having trouble responding right now:
0: unhandled error (ValidationException)
1: service error
2: unhandled error (ValidationException)
3: Error { code: "ValidationException", message: "Improperly formed request.", aws_request_id: "5063a30b-4b3f-4820-a1e9-ac2aa447e2bc" }
Location:
/private/tmp/788abf33-519d-4264-918b-e563eeb425ff/crates/q_chat/src/lib.rs:1015
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
> q issue
I understand you're looking for information about issues with Amazon Q. Let me help you with that.
To report an issue with Amazon Q, I can help you create a GitHub issue with details about the problem you're experiencing. This will allow the Amazon Q team to investigate and address your concerns.
Would you like me to:
1. Help you report a specific issue you're encountering with Amazon Q?
2. Provide information about common issues and troubleshooting steps for Amazon Q?
3. Guide you through checking the status of existing Amazon Q issues?
Please let me know what specific aspect of "q issue" you're interested in, and I'll provide more targeted assistance.
[Tool uses: none]
> Amazon Q is having trouble responding right now: >
0: unhandled error (ValidationException)>
1: service error>
2: unhandled error (ValidationException)>
3: Error { code: "ValidationException", message: "Improperly formed request.", aws_request_id: "c7b8027f-4a75-406d-ad02-2c43209d8cca" }>
>
Location:>
/private/tmp/788abf33-519d-4264-918b-e563eeb425ff/crates/q_chat/src/lib.rs:1015>
>
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.>
Run with RUST_BACKTRACE=full to include source snippets.
I'll help you report this issue with Amazon Q. This appears to be a validation error that's preventing Amazon Q from responding correctly.
[Tool uses: report_issue]
(...truncated)
```
### Steps to reproduce
Run an mcp tool
Run /context show
Run /compact
### Environment
```yaml
[q-details]
version = "1.9.1"
hash = "5d2c2807cab9bc6c9dc5fcd05f92c7a979e8a4f7"
date = "2025-04-29T06:22:42.917989Z (17d ago)"
variant = "full"
[system-info]
os = "macOS 15.4.1 (24E263)"
chip = "Apple M3 Pro"
total-cores = 11
memory = "18.00 GB"
[environment]
cwd = "/Users/USER/ecommerce-website"
cli-path = "/Users/USER/ecommerce-website"
os = "Mac"
shell-path = "/opt/homebrew/Cellar/zsh/5.9/bin/zsh"
shell-version = "5.9"
terminal = "VSCode"
install-method = "brew"
[env-vars]
PATH = "/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:/opt/homebrew/opt/ruby/bin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/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/.cargo/bin:/Users/USER/.local/bin:/Users/USER/.toolbox/bin:/Users/USER/.vscode/extensions/ms-python.debugpy-2025.8.0-darwin-arm64/bundled/scripts/noConfigScripts:/Users/USER/.toolbox/bin:/Users/USER/Library/Android/sdk/cmdline-tools/latest/bin"
QTERM_SESSION_ID = "13788a74fa7c4c6dbd2a32a50f07e700"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.9.1"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.microsoft.VSCode"
[chat-settings]
interactive=true
[chat-trusted_tools]
[chat-failed_request_ids]
none
[chat-context]
current_profile=default
profiles=
default
frontend-dev
global_context=
.amazonq/rules/**/*.md
README.md
AmazonQ.md
profile_context=none
files=
/Users/konker/ecommerce-website/.amazonq/rules/backend-rules.md, 580 tkns
/Users/konker/ecommerce-website/.amazonq/rules/frontend-rules.md, 630 tkns
/Users/konker/ecommerce-website/AmazonQ.md, 710 tkns
/Users/konker/ecommerce-website/README.md, 1980 tkns
total context size=3900 tkns
```
Contributor guide
Assessment
This issue has not been assessed yet.