aws / aws/amazon-q-developer-cli
bug: Conversation history doesn't persist when /context add is used
- 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
### Expected behaviour
When running `q chat --resume` in the same directory, the previous conversation should be restored
### Actual behaviour
Conversation history fails to persist when the `/context add` command is used:
1. After using `/context add`, subsequent conversation responses are not saved
2. When running `q chat --resume`, the previous conversation history is lost in favor of the one before that
### Steps to reproduce
## Step 1: Start a basic conversation
```console
$ q chat
> Introduce yourself
[Q introduces itself]
> /quit
```
## Step 2: Verify conversation persists
```console
$ q chat --resume
Picking up where we left off...
[Q shows a summary of its introduction]
> /quit
```
## Step 3: Add context and have conversation
```console
$ q chat
> /context add README.md
> Summarize the context
[Q provides summary of README.md]
> /quit
## Step 4: Restart - conversation history is lost
```console
$ q chat --resume
Picking up where we left off...
> [Q shows a summary of its introduction, not the summary of its context]
```
### Environment
```yaml
```
Contributor guide
Assessment
This issue has not been assessed yet.