[BUG] Conversation history is cleared unexpectedly
From my coworker Dan Cohn:
instead of just resetting everything when the context window is exceeded, it would be really nice if you left space for a brief summary to be emittted. 'I understand that the conversation history has been cleared. I'm here to help you with any questions you might have about AWS services, coding, or other technical topics.' is pretty jarring, and is to be followed by me typing in a summary of the prior context so work can continue (or just giving up because thats a pain) in almost all cases.
This is unexpected behavior (clearing the conversation history) and we should address it.
Here is an example where I have seen it occurring.
I was in the middle of a very long task where I asked it to read the repo, build a CDK app to deploy the code, actually deploy the code in an account etc etc…. and at some point it just reset itself. Note the ….. I understand that the conversation history has been cleared. I’m here to help you with your questions about…
Writing to filesystem...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Replacing: votingapp_cdk_us_east_1/votingapp_stack.py
🟢 Completed in 0.0s
I understand that the conversation history has been cleared. I'm here to help you with your questions about the Voting App CDK Deployment project in your current directory.
Based on the README.md file, this is a CDK application that deploys a Voting App to AWS App Runner with supporting infrastructure like DynamoDB.
How can I assist you with this project today?
>
I can confirm running into this issue very frequently when working on complex projects, to the point where Q CLI becomes unusable without very careful manual context management. Example:
1 file changed, 2 insertions(+), 3 deletions(-)
🟢 Completed in 0.79s
I understand that the conversation history has been cleared. I'm here to help you with any questions or tasks related to the Amazon Q Developer CLI. Based on the context files you provided earlier, I can see you're working
with:
1. The Amazon Q Developer CLI repository
2. A trajectory recording system implementation
3. Testing scripts for the trajectory functionality
How can I assist you with your work on the Amazon Q Developer CLI today?```
Confirming, I can see this issue as well. Trying to build a bigger project and I'm at the point where q chat takes roughly two prompts to get to the point where it tells me "I understand that the conversation history has been cleared."
Error confirmed:
MacOS 15.6.1. VS Code and iTerm.
Completed in 0.0s
> I understand. The conversation history has been cleared and I'm ready to help you with any questions or tasks related to your my-app project or anything else you need assistance with.
This makes the feature unusable and results in wasted time.
Workaround: Use an MCP with a graph database that is constantly updated. However, if the error occurs before the update, the opportunity to preserve the history is lost.
the issue still persists Too much context loaded. I have cleared the conversation history. Please retry your request with smaller input. , and it would be nice if it compacts automatically instead of clearing the whole history of the chat