Broken shell step preview in VSCode's chat window
Resolved 💬 18 comments Opened Nov 3, 2025 by nos1609 Closed Jun 12, 2026
💡 Likely answer: A maintainer (bolinfest, collaborator)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.53.0
What subscription do you have?
Plus
Which model were you using?
gpt5-codex
What platform is your computer?
Win 11 10.0.26200.0 ARM64 + WSL Fedora 42
What issue are you seeing?
<img width="752" height="431" alt="Image" src="https://github.com/user-attachments/assets/eb9324fd-5811-4f90-9c76-1815873b5184" />
some unreadable text in shell step preview
What steps can reproduce the bug?
run codex exec "пример", the chat's preview window of VSCode extension, it is going to show some weird characters, no matter fonts or locale availability.
What is the expected behavior?
correct text encoding, accordingly to OS fonts and locale availability, same as in the VSCode's built-in terminal window.
Additional information
Able to reproduce locally on demand if needed
18 Comments
@nos1609 Out of curiosity, was this running anything whether the output may have been binary or had any special encoding?
Is it possible for you to find the corresponding
.jsonlfile under~/.codex/sessionsand could you share the content if it's not sensitive? Perhaps then we could at least figure out what command it was running?@bolinfest here you go, a new example
part biosboot --fstype=biosboot --size=1 --ondisk=${PRIMARY_DISK} --label=BIOSBOOT --name=biosboot
part /boot --fstype=xfs --size=1024 --ondisk=${PRIMARY_DISK} --label=BOOT --name=boot
part swap --fstype=swap --size=${SWAP_SIZE} --ondisk=${PRIMARY_DISK} --label=SWAP --name=swap
part / --fstype=xfs --size=1 --grow --ondisk=${PRIMARY_DISK} --label=ROOT --name=root
Also noted a "self-fixing" behavior - once completed the task, review shows text in correct encoding.
Worth mentioning, that @LIHUA919 description is accurate about the issue.
https://github.com/openai/codex/pull/6182
Wow, this markup even breaks GH's own code block preview 🤔
@joshka-oai this appears to be a bad interaction between VS Code's integrated terminal on Windows and...non-Latin characters, maybe? Seems likely to be a decoding or escaping issue: can you investigate?
/cc @easong-openai
The linked PR seems reasonable, but I wonder In terms of sidestepping this issue rather than detecting and converting if it is reasonable / possible for codex to configure the shell to only output utf-8. Or is that not possible? Apologies in advance for my naive question here. It's likely that @nos1609 and @lihua919 are probably much more familiar with international code pages than I am here (there's a lot of unknown unknowns for me).
I don't see any issue with that, but I don't even know what could be more imperative for codex on Fedora than
LANG=en_US.UTF-8as env, which is already the default encoding in WSL...Maybe this might shed the light a bit, perhaps might be a VSCode/WSL issue
https://github.com/MicrosoftDocs/windows-dev-docs/blob/docs/hub/apps/design/globalizing/use-utf8-code-page.md
https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/
Though haven't been able to reproduce this issue if just using the interactive mode in VSCode's terminal.
Thanks for those pointers. Seems like it might be exactly what we need to know. Will dive into them a bit later this week when time permits me to dive into Windows mode.
I was thinking more about this point and it didn't click to me what you meant here until now. My understanding is that VSCode will inherit the Codepage of the process that launched it. Can you perhaps try launching VSCode directly (i.e. not from a console) and see if you still hit this same problem?
If that does fix things, it might be good to diagnose / provide some more details about the steps to launch. What I'd like to see is what locales you're seeing anywhere in the path of launch through to the command. (E.g. you ran terminal, chose powershell, ...) I haven't yet tested this on windows as yet, so I'm not sure if this is an always reproducible problem or one that's specific to a machine setup in an international locale.
That was the way, but it also launched "nested" codex-cli in full access mode. I might try to reproduce that with another command like cat or something else outputting non utf-8 text in a codex chat step.
I've also made a separate "native" node.js outside of WSL to solve such things, going to try to reproduce it there also, in a more straight-forward VSCode setup.
Over in https://github.com/openai/codex/pull/6182 there's a potential fix for this. Would you be ok with taking a look to see if that addresses your problem?
Looks like still not fixed on v0.4.46
<img width="828" height="311" alt="Image" src="https://github.com/user-attachments/assets/3790059d-465e-4f5b-bbe7-c568b19e9294" />
@nos1609, the PR that attempts to fix this should be in the next published release.
An example on a system with en-US locale, seems a bit different, hope it'll be fixed by that PR
<img width="632" height="492" alt="Image" src="https://github.com/user-attachments/assets/01529f36-d2f5-44bf-b11b-1b5dbe240967" />
<img width="1077" height="273" alt="Image" src="https://github.com/user-attachments/assets/5a6aec1e-bdb8-4fa5-8132-e3155758fded" />
Fresh catch today
@nos1609 what version of the extension are you running / which model are you using?
Looks like fixed on v0.4.60
<img width="1113" height="546" alt="Image" src="https://github.com/user-attachments/assets/90ea5c81-b82a-4ecc-be2a-664bd13a8344" />
<img width="1413" height="653" alt="Image" src="https://github.com/user-attachments/assets/4677b4eb-b014-47f2-a456-af034d392077" />
But this is the native PowerShell use, no WSL implied
Closing as resolved in current releases.