What version of Codex is running?
codex-cli 0.133.0
What platform is your computer?
Local machine:
- VS Code integrated terminal over Remote SSH
- VS Code terminal setting:
terminal.integrated.enableKittyKeyboardProtocol = true
TERM_PROGRAM_VERSION=1.121.0
Remote machine:
- Debian GNU/Linux 13 (trixie)
- Linux 6.12.88+deb13-amd64 x86_64
- Shell: bash
TERM=xterm-256color
TERM_PROGRAM=vscode
What steps can reproduce the bug?
- Open a fresh VS Code integrated terminal connected to a Linux host via SSH.
- Start
codex.
- Exit
codex.
- Press
Tab in the shell.
This reproduces consistently in a fresh SSH session.
What is the expected behavior?
After exiting Codex, the shell should return to normal terminal input behavior and pressing keys like Tab should not print raw escape-sequence fragments.
What do you see instead?
After exiting Codex, the shell prints raw fragments such as:
Sometimes I also see:
These appear to correspond to kitty keyboard protocol key release events leaking into the shell instead of being fully cleaned up on exit.
Additional information
- This does not appear to be a VPS locale/encoding problem.
- The issue disappears if I disable the local VS Code setting:
"terminal.integrated.enableKittyKeyboardProtocol": false
- I tested this in a fresh SSH session and can reproduce it reliably by entering and exiting Codex.
- I also tested a Bash-side workaround that tried to reset keyboard enhancement flags on each prompt, but it did not reliably fix the problem in VS Code's integrated terminal.
- This suggests an interoperability issue between Codex terminal cleanup on exit and VS Code/xterm.js kitty keyboard protocol handling.
Minimal environment evidence
codex-cli 0.133.0
Debian GNU/Linux 13 (trixie)
Linux 6.12.88+deb13-amd64 x86_64 GNU/Linux
TERM=xterm-256color
TERM_PROGRAM=vscode
TERM_PROGRAM_VERSION=1.121.0
What version of Codex is running?
codex-cli 0.133.0
What platform is your computer?
Local machine:
terminal.integrated.enableKittyKeyboardProtocol = trueTERM_PROGRAM_VERSION=1.121.0Remote machine:
TERM=xterm-256colorTERM_PROGRAM=vscodeWhat steps can reproduce the bug?
codex.codex.Tabin the shell.This reproduces consistently in a fresh SSH session.
What is the expected behavior?
After exiting Codex, the shell should return to normal terminal input behavior and pressing keys like
Tabshould not print raw escape-sequence fragments.What do you see instead?
After exiting Codex, the shell prints raw fragments such as:
Sometimes I also see:
These appear to correspond to kitty keyboard protocol key release events leaking into the shell instead of being fully cleaned up on exit.
Additional information
Minimal environment evidence