Windows cmd.exe/conhost session can flip from TrueType font to raster Terminal while Codex CLI is running
Summary
On Windows 10, when running Codex CLI inside classic cmd.exe / conhost.exe (not Windows Terminal), the live console session can intermittently switch from a normal TrueType font (for example Consolas at ~20 px) to raster Terminal while Codex is still running.
This appears to be a runtime console-host font flip, not just bad saved console settings.
Environment
- Codex CLI version:
0.122.0 - Platform:
Microsoft Windows 10.0.19045.6456 x64 - Terminal: classic
cmd.exehosted byconhost.exe - Observed on: 2026-04-23
What happens
- Codex starts normally in a readable TrueType font.
- After some time in a normal interactive session, the same running
cmd.exewindow flips to rasterTerminal. - When this happens, glyph quality visibly degrades and letters like
C,D,X,Zlook wrong/blocky.
Expected behavior
The active Codex session should keep using the configured TrueType console font for the lifetime of the session.
Actual behavior
The active Codex session intermittently switches to raster Terminal at runtime.
Local investigation
I instrumented the live cmd.exe console with Win32 console APIs:
- The bad live Codex session reported:
FaceName = TerminalFontSize = 12x8FontFamily = 0x30- At the same time, the saved registry-backed console settings still reported the expected TrueType values:
HKCU\Console\FaceName = ConsolasFontFamily = 0x36FontSize = 0x140000FontWeight = 400- same for the main
cmd.exesubkeys such as%SystemRoot%_System32_cmd.exe
So the failure is not just persisted registry drift. The running console session itself flips.
I also verified that an external helper can immediately repair the bad window in place by attaching to the affected cmd.exe and calling SetCurrentConsoleFontEx(...) back to Consolas 20 px.
Additional observations
- I could not reproduce this immediately in every fresh throwaway
cmd.exe+codexlaunch, so the trigger may be intermittent / session-lifetime related. - Simple title changes alone (
title admin, spinner glyphs, UTF-8 code page) did not reproduce it in isolated tests. - Import inspection of the bundled native
codex.exeshowed normal console APIs such asCreateConsoleScreenBuffer,SetConsoleActiveScreenBuffer,SetConsoleMode,ReadConsoleW,WriteConsoleW, etc., but I did not see imports forSetCurrentConsoleFontEx/GetCurrentConsoleFontEx.
That makes this look more like a Codex TUI interaction with classic Windows console host state than an intentional explicit font change.
Possible relationship
This may be related to the broader set of Windows classic-console / conhost.exe issues already reported for Codex, for example legacy conhost.exe behavior in #12457, but this seems to be a separate symptom.
Reproduction status
Intermittent, but reproduced multiple times on the same machine on 2026-04-23 in a long-running Codex CLI session under classic cmd.exe / conhost.exe.
Workaround
Externally reattach to the affected cmd.exe and call SetCurrentConsoleFontEx(...) to restore Consolas. Using Windows Terminal instead of classic cmd.exe / conhost.exe may also avoid this code path.