aws / aws/amazon-q-developer-cli

Infinite loop running q login successfully, but 'q chat' says I'm not logged in

Open
#2,767 2 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 5.10.240-218.959.amzn2int.x86_64 - Amazon Linux 2

### Expected behaviour

1. Expected `q chat` to work as it did yesterday.
2. Expected logging out and re-logging in to work as it has before.

### Actual behaviour

I encountered this after the release of 1.15:

```
Amazon Q is having trouble responding right now:
0: Failed to send the request: unhandled error (AccessDeniedException)

Location:
crates/chat-cli/src/cli/chat/mod.rs:976

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
```

Previously, running `q logout` followed by the `q login` steps resolved this. At the end of the login process, I get the "Request approved / Amazon Q Developer for command line can now access your data in Amazon Q Developer." confirmation, but back on my CDD, `q chat` still reports"error: You are not logged in, please log in with q login". I've retried q login several times with reboots.

I backed up and deleted my `mcp.json` file, uninstalled and reinstalled q, same errors.

Running `q restart` returns "error: Please restart Amazon Q from your host machine"

Running `q doctor` gives "✘ Auth: Not authenticated. Please run q login / error: Not authenticated. Please run q login"

### Steps to reproduce

_No response_

### Environment

```yaml

[q-details]
version = "1.15.0"
hash = "eb8db5c635fc469f3bd94ead16bb4bfbREDACTED"
date = "2025-09-02T17:56:10.61532Z (23h ago)"
variant = "minimal"

[system-info]
chip = "AMD EPYC 9R14"
total-cores = 16
memory = "61.44 GB"

[system-info.os.linux]
kernel_version = "5.10.240-218.959.amzn2int.x86_64"
id = "amzn"
name = "Amazon Linux"
pretty_name = "Amazon Linux 2"
version_id = "2"
version = "2"
variant = "internal"

[environment]
cwd = "/local/home/USER"
cli-path = "/local/home/USER"
os = "Linux"
shell-path = "/usr/bin/zsh"
shell-version = "5.8"
install-method = "toolbox"
in-ssh = true

[env-vars]
DISPLAY = "localhost:10.0"
PATH = "/home/USER/.local/share/mise/installs/node/18.20.2/bin:/home/USER/.local/share/mise/installs/python/3.12.9/bin:/home/USER/.local/share/mise/installs/python/3.11.11/bin:/home/USER/.local/share/mise/installs/python/3.10.16/bin:/home/USER/.local/share/mise/installs/python/3.9.21/bin:/home/USER/.local/share/mise/installs/python/3.8.20/bin:/home/USER/.toolbox/bin:/home/USER/.cargo/bin:/usr/local/bin:/usr/bin:/home/USER/bin:/usr/local/sbin:/usr/sbin:/home/USER/.local/bin"
SHELL = "/bin/zsh"
TERM = "xterm"
```

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.