aws / aws/amazon-q-developer-cli

Focus reporting escape codes not disabled on exit.

Open
#3,837 0 comments 1 reaction 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 6.8.0-124-generic - Ubuntu 24.04.4 LTS

### Expected behaviour

There should be no escape codes after exiting kiro-cli

### Actual behaviour

After exiting kiro-cli, terminal continues emitting ^[[I (FocusIn) and ^[[O (FocusOut) sequences when switching tabs/windows. The exit handler should send \e[?1004l to disable focus reporting.

### Steps to reproduce

- Ctrl+D doesn't terminate cleanly
- After exiting, cat shows ^[[I / ^[[O when focus changes
- reset or printf '\e[?1004l' fixes it

- stty -a looks normal

### Environment

```yaml

[q-details]
version = "2.6.0"
hash = "979b991de95e75ddf2318f67c6d196532502cad9"
date = "2026-06-04T23:23:10.563148Z (5d ago)"
variant = "minimal"

[system-info]
chip = "11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz"
total-cores = 4
memory = "15.28 GB"

[system-info.os.linux]
kernel_version = "6.8.0-124-generic"
id = "ubuntu"
name = "Ubuntu"
pretty_name = "Ubuntu 24.04.4 LTS"
version_id = "24.04"
version = "24.04.4 LTS (Noble Numbat)"

[environment]
cwd = "/export"
cli-path = "/export"
os = "Linux"
shell-path = "/usr/bin/bash"
shell-version = "5.2.21"
install-method = "unknown"

[env-vars]
DISPLAY = ":1"
PATH = "/home/USER/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/USER/.dotnet/tools:/usr/local/bin/apache-maven-3.2.2/bin:/usr/local/bin/apache-ant-1.9.3/bin:/opt/jboss/bin:/home/USER/Downloads/fzf-master/bin"
QT_IM_MODULE = "ibus"
SHELL = "/bin/bash"
TERM = "xterm-256color"
XDG_CURRENT_DESKTOP = "ubuntu:GNOME"
XDG_SESSION_DESKTOP = "ubuntu"
XDG_SESSION_TYPE = "x11"
XMODIFIERS = "@im=ibus"
```

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.