I tried the conversation history compression feature (/compact) in Amazon Q Developer IDE
I am Iwasa.
While looking through Amazon Q Developer documentation, I discovered a feature that compresses conversation history.
It's known that there is a fixed limit to the context window size, but it seems that as you approach the limit, response times worsen.
Also, if you exceed the context window limit, you lose context and can no longer get answers based on conversation history.
It seems we need to be careful about this when using it, but I don't think we can check usage status in Amazon Q Developer IDE.
According to the documentation specifications, when you reach 80% of the context window limit, a button appears automatically asking if you want to use the compression feature, and pressing it compresses the conversation history.
It also seems that users can manually compress conversation history using the /compact
command.
I knew that the /compact
command could be used in Amazon Q Developer CLI, but I didn't know it could also be used in IDE.
I've checked the actual behavior and would like to share it.
Conversation history is automatically cleared when the context window size limit is reached
Since I didn't know how large the limit is, I tried continuously loading documents with a lot of text.
Specifically, I loaded Usuda-san's trend check study meeting articles, starting from the latest one from July 2025 and going back in time.
After instructing it to minimize responses and just read the inputs, I loaded articles until around June 2024, at which point the following error occurred:
"Too much context loaded. I have cleared the conversation history. Please retry your request with smaller input."
It seems I reached the context size limit.
Until this error occurred, I was able to perform tasks like counting updates per month or aggregating by AWS service in the blogs, but after the error message appeared, I could no longer get responses based on conversation history, as shown below:
Looking closely at the error message, it's saying "I've cleared the conversation history because you reached the limit." That's unfortunate.
It seems the context was lost because the conversation history was cleared.
I tried several more times, but the message appeared at the same point each time, so I understood that this is approximately where the context window limit is.
Could not confirm automatic compression notification
According to the official documentation, when you reach about 80% of capacity, a compression suggestion should be notified, and pressing a button would start compression, but I couldn't confirm this automatic compression notification. I wonder why.
In my environment as of today, automatic compression notification wasn't available, and I ended up reaching the context size limit.## Manual Compression Works Well
This conversation history compression feature also allows you to manually compress the history at any time you choose.
The expected use case is when conversation history has grown significantly and Amazon Q Developer's response performance begins to degrade.
To use it, simply type /compact
in the chat window.
I executed this after entering blog articles from the trend check study group up until around July 2024.
It tells me to wait a bit while it's compressing.
After waiting a few seconds to tens of seconds, something like a compression result was output.
It says "Conversation history has been compacted successfully!", so it seems the process is complete.
The compression appears to be finished, but what exactly changed?
Let's try asking a question based on previous conversation history. Specifically, I asked about the number of updates.
This was the response:
It seems that after compression, only the summary information remains while other input information is deleted.
I couldn't get the number of updates, and was told that only the summary information is retained.
According to official documentation, detailed conversation history should remain until the end of the session, but at the time of this verification, perhaps it was lost because the context window size limit was nearly reached.
When I used /compact
at a point where the input volume wasn't too large, I was still able to access the detailed information.
Also, I was concerned that key information wasn't included in the summary earlier, but it seems the summary was minimal because I was only one-sidedly repeating inputs with minimal responses.
I confirmed that having more conversation makes information more likely to remain in the summary.
When I provided some preliminary information about points I was concerned with, such as the number of updates, the information remained in the summary as shown below:
## Finally
Today I tried using Amazon Q Developer IDE's conversation history compression feature (/compact), so I introduced its behavior.
As of today, I could not confirm the automatic compression notification function in my environment.
Manual compression was functioning. However, since the key point is how much information can be retained in the summary, it doesn't seem very effective if you're just providing input one-sidedly.
While the compression feature does exist, considering the quality of responses, we still need to be mindful of how to keep content within the context window size limit.