aws / aws/amazon-q-developer-cli
qterm integration fails to initialize - Q_TERM environment variable not set
- 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
### Operating system
Linux 5.10.238-212.953.amzn2int.x86_64 - Amazon Linux 2
### Expected behaviour
## Problem
`q doctor` consistently shows "qterm is not running in this terminal" with Q_TERM= (empty), despite multiple terminal restarts.
## Environment
- Q CLI version: 1.12.1
- OS: Linux
- Shell: zsh
- Terminal: Amazon Cloud desktop environment
### Actual behaviour
## actual behavior
- `q doctor` shows: "✘ Amazon Q terminal integrations: qterm is not running in this terminal, please try restarting your terminal"
- Q_TERM environment variable remains empty
- `q init zsh post --rcfile zshrc` generates malformed/incomplete output starting mid-code
- Multiple complete terminal restarts do not resolve the issue
- Manual attempts to set Q_TERM do not persist
## Expected Behavior
After terminal restart, qterm integration should work properly with Q_TERM set, enabling autosuggestions and shell integration.
### Steps to reproduce
## Steps to Reproduce
1. Install Q CLI (version 1.12.1)
2. Run `q doctor` - shows qterm integration error
3. Restart terminal completely (attempted multiple times)
4. Run `q doctor` again - error persists
5. Check `q init zsh post --rcfile zshrc` output - shows malformed code
6. Integration file at ~/.local/share/amazon-q/shell/zshrc.post.zsh fails when Q init command is uncommented
## Additional Notes
- Q chat functionality works normally
- Core Q CLI features are functional
- Only terminal integration features are affected
Contributor guide
Assessment
This issue has not been assessed yet.