aws / aws/amazon-q-developer-cli
q doctor is giving Q_TERM error. Also while trying to ssh localhost, getting Q_PARENT error
- 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.244-220.970.amzn2int.x86_64 - Amazon Linux 2
### Expected behaviour
While running q doctor, keep getting error as below. Even after restarting terminal, getting the same error. I am running it from devdesktop by connecting to it from visual studio code.
```
% q doctor
✘ Amazon Q terminal integrations: qterm is not running in this terminal, please try restarting your terminal
Q_TERM=
✘ Doctor found errors. Please fix them and try again.
If you are not sure how to fix it, please open an issue with q issue to let us know!
(25-10-26 19:24:12) <0> [~]
```
Also while trying to SSH, getting below error about Q_PARENT.
```
% ssh localhost
error: Q_PARENT env variable not set
%
```
### Actual behaviour
### Steps to reproduce
_No response_
### Environment
```yaml
[q-details]
version = "1.19.0"
hash = "018fd3ce90193a546de1219163c48a495d4f0ee6"
date = "2025-10-23T22:24:42.193332Z (3d ago)"
variant = "minimal"
[system-info]
chip = "AMD EPYC 7R13 Processor"
total-cores = 4
memory = "15.26 GB"
[system-info.os.linux]
kernel_version = "5.10.244-220.970.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 = "/local/home/USER/.toolbox/tools/toolbox/1.1.2244.0/toolbox-exec"
shell-version = "5.8"
install-method = "toolbox"
in-ssh = true
[env-vars]
PATH = "/home/USER/.local/share/mise/installs/node/18.20.2/bin:/home/USER/.local/share/mise/installs/python/3.12.10/bin:/home/USER/.local/share/mise/installs/python/3.11.12/bin:/home/USER/.local/share/mise/installs/python/3.10.17/bin:/home/USER/.local/share/mise/installs/python/3.9.22/bin:/home/USER/.local/share/mise/installs/python/3.8.20/bin:/home/USER/.toolbox/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/USER/.cargo/bin:/usr/local/bin:/usr/bin:/home/USER/bin:/usr/local/sbin:/usr/sbin:/home/USER/.local/bin"
Q_SET_PARENT_CHECK = "1"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
```
Contributor guide
Research direction
Start with the q doctor terminal-integration check and the handling of Q_TERM and Q_PARENT in the Amazon Linux 2, toolbox, zsh, and SSH environment described here. Reproduce the failure with q doctor and ssh localhost; done means q doctor no longer reports that qterm is not running and SSH no longer reports a missing Q_PARENT variable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, rust, shell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100