aws / aws/amazon-q-developer-cli
Compacted summary is retained after clearing conversation
- 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 5.10.239-216.958.amzn2int.x86_64 - Amazon Linux 2
### Expected behaviour
When I run `/clear`, all conversation is cleared including the summary of the conversation after previously running `/compact`.
### Actual behaviour
After running `/clear`, information about the previous conversation is retained if `/compact` was used previously. Information about the previous conversation is referenced in the new conversation after running `/clear`.
### Steps to reproduce
```
user> Tell me about birds in 1 sentence.
assistant> Birds are warm-blooded vertebrates characterized by feathers, beaks, and the ability to lay eggs, with most species capable of flight.
user> /compact
✔ Conversation history has been compacted successfully!
user> /clear
Are you sure? This will erase the conversation history and context from hooks for the current session. [y/n]:
> y
Conversation history cleared.
user> What animals were we talking about?
assistant> Based on our previous conversation summary, we were talking about birds.
Specifically, you had requested basic information about birds, and we discussed their biological classification as warm-blooded vertebrates. The conversation covered birds' defining characteristics including their feathers, beaks, egg-laying
capability, and flight ability (in most species).
```
When asking the same question on a fresh invocation of `q chat` it does not halucinate about birds so we can rule that out:
```
user> What animals were we talking about?
assistant> I don't see any previous discussion about animals in our conversation. This appears to be the start of our chat session, so we haven't talked about any animals yet.
Is there a particular animal or group of animals you'd like to discuss? I'm happy to help with information about animals, whether it's for AWS-related use cases (like wildlife monitoring with IoT sensors), general information, or something
else you have in mind.
```
### Environment
```yaml
[q-details]
version = "1.12.99"
hash = "a5c6546ebd61b22117ad393773780e15fc8669ee"
date = "2025-07-23T00:36:27.942272Z (2d ago)"
variant = "minimal"
[system-info]
chip = "Intel(R) Xeon(R) Platinum 8488C"
total-cores = 16
memory = "123.78 GB"
[system-info.os.linux]
kernel_version = "5.10.239-216.958.amzn2int.x86_64"
id = "amzn"
name = "Amazon Linux"
pretty_name = "Amazon Linux 2"
version_id = "2"
version = "2"
variant = "internal"
[environment]
cwd = "/local/home/USER"
cli-path = "/local/home/USER"
os = "Linux"
shell-path = "/usr/bin/zsh"
shell-version = "5.8"
install-method = "unknown"
in-ssh = true
[env-vars]
PATH =
QTERM_SESSION_ID = "7f6c6a5e73e445c1944956aef037fcd8"
Q_PARENT = "/tmp/q-parent-ea2c6b2bfa0d4c7db0197c1c832508a7.socket"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.12.99"
SHELL = "/bin/zsh"
TERM = "screen-256color"
```
Contributor guide
Assessment
This issue has not been assessed yet.