aws / aws/amazon-q-developer-cli

Amazon Q defined 'shell integration' check does not always mean it is not setup

Open
#3,144 0 comments 0 reactions 0 assignees View on GitHub
bug
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 26.0.1 (25A362)

### Expected behaviour

don't always modify my .zshrc

### Actual behaviour

I manage my shell rc files differently. I've extracted what the Q Shell integration does for ZShell and I emulated the way it installs for my setup. Instead of checking for whether the ZSHRC file actually has the script in it, it should check if the command or the process is running in the terminal and it should definitely not always modify the ZSHRC file just for running Q Doctor.

### Steps to reproduce

_No response_

### Environment

```yaml

[q-details]
version = "1.17.1"
hash = "52301a3b0f81abff5ecde04a02481734c5c7ecc4"
date = "2025-09-30T22:25:33.521557Z (9d ago)"
variant = "full"

[system-info]
os = "macOS 26.0.1 (25A362)"
chip = "Apple M3"
total-cores = 8
memory = "24.00 GB"

[environment]
cwd = "/Users/USER/projects/adminhub"
cli-path = "/Users/USER/projects/adminhub"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "iTerm 2"
install-method = "brew"

[env-vars]
PATH = "/Users/USER/.local/share/mise/installs/ruby/3.3.6/bin:/Users/USER/.local/share/mise/installs/node/22.17.0/bin:/Users/USER/.local/share/mise/installs/python/3.12.3/bin:/opt/homebrew/opt/findutils/libexec/gnubin:/opt/homebrew/bin:/opt/homebrew/sbin:/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:/Users/USER/.cargo/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/USER/.local/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
QTERM_SESSION_ID = "a9a50174df7e4268a8e383d8808f2930"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.17.1"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"
```

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.