Accented characters not working in Codex on WSL2 terminal in VSCode
Resolved 💬 19 comments Opened Mar 5, 2026 by samuelrizzo Closed Apr 21, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
0.111.0
What subscription do you have?
Chat GPT Plus
Which model were you using?
gpt 5.4 (medium)
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
WSL2
What issue are you seeing?
i’m brazilian, and our language uses accents. for example, “é” means “is”. however, i can’t type accented characters in codex when running in the wsl2 terminal inside vscode. interestingly, if i start wsl2 from powershell (outside vscode), the accents work normally
What steps can reproduce the bug?
Uploaded thread: 019cc041-da1b-7c82-9df4-2dc6139537c9
What is the expected behavior?
_No response_
Additional information
_No response_
19 Comments
Do accented characters work in the VS Code terminal when you're not running codex in it? I'm wondering whether this is a VS Code terminal problem or a Codex bug.
@etraut-openai
I’m having the same problem. Accented characters work fine in the VS Code terminal/WLS2 terminal, the issue literaly only occurs in the Codex CLI.
I tried setting the locale in WSL2 with:
sudo locale-gen pt_BR.UTF-8 && sudo update-locale LANG=pt_BR.UTF-8 LC_ALL=pt_BR.UTF-8But it didn’t fix the issue.
v0.111.0 too
@etraut-openai I can confirm this is still happening for me, including on alpha.
Observation: In my Ubuntu terminal (WSL2), accent composition works normally outside Codex.
The issue happens only after entering Codex (inside Codex input). This started for me from
version 0.111.0.
## Environment
## Repro
## Actual
## Expected
## Extra notes
@etraut-openai I prepared a focused fix for #13638 and kept it aligned with the contribution policy (no unsolicited PR
opened).
Compare link:
https://github.com/openai/codex/compare/main...rafael-agenticca:codex-upstream-fork:fix/wsl-vscode-dead-keys-13638-main?expand=1
Summary
other environments.
codex-rs/tui/src/tui.rs,codex-rs/cloud-tasks/src/lib.rs), no unrelated refactors.Validation
' + a,^ + e,~ + a), whileçworked.If this direction matches the intended solution, could I receive an invitation to open an upstream PR?
I can confirm the issue: no accented characters are working. Additionally, even when using Caps Lock or manually switching between uppercase and lowercase letters, it still does not function properly.
Same here. All other CLI tools work as expected (Claude, Gemini CLI, Qwen...)
Same happens with DE-CH layout but for all shift-key combinations: https://github.com/openai/codex/issues/14391
I'm also experiencing the same issue on v0.117.0.
This might be the case for a switch to claude code, in Portuguese it's extremely irritating to not be able to use accentuation, specially to differentiate "é" from "e".
I thought this latest update would fix it, but it’s still the same. Guess I’ll have to use Opencode.
Three weeks ago, I reported that this issue occurred in version 0.111. We are already at version 0.117 and the bug has still not been included in the new releases.
I also published the bug fix, submitted a pull request, and shared the link to the fix in that post (https://github.com/openai/codex/issues/13638#issuecomment-4019174735).
I even reworked the fix from 0.116 to 0.117, which had to handle some new specifics:
It is already working for me in version 0.117, but with every new release, I have to fix and recompile Codex in Rust again just to work around this bug.
The issue is extremely simple to fix, but it seems it has not yet been prioritised for inclusion. This has become quite frustrating for all users running Codex inside VSCode on Windows.
I confirm that the error still exists in version v.0.117.0
I am also Brazilian but I don't have a ABNT2 keyboard to test. I always use English International layout on all my Windows machines. I couldn't replicate this issue with this layout:
<img width="604" height="312" alt="Image" src="https://github.com/user-attachments/assets/ea15454d-5e7c-4f61-9aec-b3076e4faa7d" />
Can anyone with this layout checkout the branch
fcoury/fix-accented-charsand let me know if it solves this issue?@rafael-agenticca @samuelrizzo se vocês tiverem um tempinho, conseguem me ajudar nesse teste?
_if you have time, can you help me with this test?_
@fcoury-oai no v0.118.0 funcionou no powershell do vscode, mas no WSL2 ainda segue sem funcionar, vou testar esse branch e te retorno
Excelente @samuelrizzo muito obrigado!
@samuelrizzo conseguiu testar?
_did you manage to test it?_
@samuelrizzo did you try it?
I can reproduce this on aarch64 Raspberry Pi + VSCode Remote SSH (non-WSL). The escape sequence
^[[13;1:3uleaks into the terminal and dead keys (circumflex, grave, etc.) produce no accented character.Root cause in
codex-rs/tui/src/tui/keyboard_modes.rs:On non-WSL Linux the
is_wslshort-circuit makesis_vscode_terminalalwaysfalse, so the kitty protocol is enabled even though the VSCode PTY can't compose dead keys under it.Fix — remove the WSL guard (two-line change):
running_in_vscode_terminal()already reads Linux-sideTERM_PROGRAMfirst, and thecmd.exeWindows interop probe is only reached on WSL — so no regression for the existing WSL+VSCode path. On Remote SSH, VS Code injectsTERM_PROGRAM=vscodevia shell integration, so detection works out of the box.I've prepared a ready-to-merge branch with updated tests: https://github.com/yaco16/codex/tree/fix/vscode-remote-ssh-dead-keys
Workaround until this lands:
Thanks, this looks like a real follow-up, but it is a different environment from the original WSL2 report. I opened #22839 to track the native Linux VS Code Remote SSH case separately. I am testing a narrow follow-up that extends the keyboard-enhancement guard to Linux VS Code terminals while keeping the original WSL fix intact.