aws / aws/amazon-q-developer-cli
After compacting conversation history, Q forgets the methodology I asked it to use
- 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
macOS 14.7.6 (23H626)
### Expected behaviour
After compacting, Q should continue the task I gave it (see initial prompt in **Steps to reproduce**)
Sample output:
```
Found the configuration history for the deleted EC2 instance i-058a4ca53cb9b520e. Here's the information:
ARN: arn:aws:ec2:us-east-1:965578820099:instance/i-058a4ca53cb9b520e
Instance Tags:
• **Name:** a909591-fs-qcp-prod-2021batch-use1-ins
• **Backup:** false
• **Patch Group:** na
• **aws:autoscaling:groupName:** a909591-fs-qcp-prod-2021batch-use1-asg
• **aws:cloudformation:logical-id:** WebServerGroup
• **aws:cloudformation:stack-id:**
arn:aws:cloudformation:us-east-1:965578820099:stack/stack-ei7mwwa0amwuqab7i/d34c2640-538d-11ec-a35c-0a32d4c388d9
• **aws:cloudformation:stack-name:** stack-ei7mwwa0amwuqab7i
• **tr:application-asset-insight-id:** 909591
• **tr:asm-apptype:** FSBatch24
• **tr:business-segment:** ctt
• **tr:component-name:** qcp
• **tr:environment-name:** prod
• **tr:environment-type:** PRODUCTION
• **tr:financial-identifier:** 1220901052
• **tr:project-name:** fs
• **tr:service-name:** 2024batch
```
### Actual behaviour
After compacting, Q appears to forget the initial prompt, and starts diving a summary of what it has found so far
Sample output:
```
Perfect! Now I have the configuration history for instance i-06e17735738bd4cc4. Based on the conversation summary and
this new data, I can see this is another instance from the Thomson Reuters 2021batch service that follows the same
pattern as the 17 instances we analyzed previously.
## Analysis of Instance i-06e17735738bd4cc4
This instance fits perfectly into the pattern we identified from the previous 17 deleted EC2 instances in the Thomson
Reuters infrastructure:
Instance Details:
• **Instance ID**: i-06e17735738bd4cc4
• **Instance Type**: t3.large Windows instance
• **Lifecycle**: Created February 11, 2024 → Deleted February 24, 2024 (13-day lifespan)
• **CloudFormation Stack**: stack-ei7mwwa0amwuqab7i (same as other 2024batch instances)
Service Classification:
This instance belongs to the 2024batch service group, as evidenced by:
• tr:service-name: "2024batch"
• tr:asm-apptype: "FSBatch24"
• CloudFormation stack: stack-ei7mwwa0amwuqab7i
Tag Analysis:
The instance has the same organizational tag structure we identified across all Thomson Reuters instances:
• tr:application-asset-insight-id: "909591"
• tr:business-segment: "ctt"
• tr:environment-type: "PRODUCTION"
• tr:financial-identifier: "1220901052"
Patch Management Evolution:
The configuration history shows interesting patch management changes:
1. Initial state (Feb 11): Only basic "Patch Group": "na"
2. Later updates (Feb 17-18): Added AMS patch management:
• AMSDefaultPatchGroup: "True"
• AMSPatchGroup: "2024batch-PRODUCTION"
Auto Scaling Integration:
The earliest configuration shows the Auto Scaling group tag:
• aws:autoscaling:groupName: "a909591-fs-qcp-prod-2024batch-use1-asg"
This instance represents the 18th deleted EC2 instance from the Thomson Reuters batch processing infrastructure,
following the exact same patterns we identified in our previous analysis of the 17 instances. It confirms the
consistency of the infrastructure design and management practices across the 2024batch service tier.
```
### Steps to reproduce
Initial prompt:
```
When I provide an EC2 instance ID, assume that it has been deleted, search configuration history for its tags, and tell me its ARN.
```
1. Provide EC2 instance IDs, one at a time, until the context window overflows (about 15-20)
2. Conversation history is compacted automatically
3. Provide another EC2 instance ID
### Environment
```yaml
[q-details]
version = "1.12.6"
hash = "9c083cf7e8f7de077eb116c3993823b82f71ca12"
date = "2025-07-18T21:39:58.652366Z (4d ago)"
[system-info]
os = "macOS 14.7.6 (23H626)"
chip = "Apple M3 Pro"
total-cores = 12
memory = "36.00 GB"
[environment]
cwd = "/Users/USER"
cli-path = "/Users/USER"
install-method = "unknown"
[env-vars]
PATH = "/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:/Library/Apple/usr/bin:/Users/USER:/Users/USER/Library/Python/3.9/bin:/Users/USER/.local/bin"
QTERM_SESSION_ID = "bbe549c34be8428fb56d85857197673c"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.12.4"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.apple.Terminal"
```
Contributor guide
Assessment
This issue has not been assessed yet.