aws / aws/amazon-q-developer-cli

bug: q chat -r resumes with profile you switched out of

Open
#2,414 0 comments 0 reactions 0 assignees View on GitHub
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

### Expected behaviour

When I switch from some profile `test` to `default`, quit the chat, and then resume, I expect the chat to start off with the `default` profile. Similarly, if I switch from `test` to `default`, delete the `test` profile, quit the chat, and then use `q chat -r` to resume, I expect to start in the `default` profile.

### Actual behaviour

The actual behavior is the chat resumes with the `test` profile both when you just switch away from it and when you delete it.

Image

Image

### Steps to reproduce

1. `q chat`
2. `/profile create test`
3. `/profile set default`
4. `/quit`
5. `q chat -r`

### Environment

```yaml
[q-details]
version = "1.12.7"
hash = "ed77799a52644ba49a3ed76b15c25cd9334c4b8d"
date = "2025-07-22T17:42:51.034216Z (7d ago)"
variant = "full"

[system-info]
chip = "12th Gen Intel(R) Core(TM) i7-1265U"
total-cores = 6
memory = "15.44 GB"

[system-info.os.linux]
kernel_version = "6.6.87.2-microsoft-standard-WSL2"
id = "ubuntu"
name = "Ubuntu"
pretty_name = "Ubuntu 24.04.2 LTS"
version_id = "24.04"
version = "24.04.2 LTS (Noble Numbat)"

[environment]
cwd = "/mnt/c/Users/USER"
cli-path = "/mnt/c/Users/USER"
os = "Linux"
shell-path = "/usr/bin/bash"
shell-version = "5.2.21"
install-method = "unknown"
in-wsl = true
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.