Codex Desktop terminal font rendering is still broken / spaced out

Open 💬 15 comments Opened Apr 19, 2026 by Ahmet-Dedeler
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What happened?

The Codex Desktop app terminal is still rendering terminal output with extremely spaced-out / pseudo-italic-looking text.

This is not the command output inserting spaces. The same text is normal shell output, but inside the Codex app terminal it gets rendered like every character has huge tracking, for example:

d e v : s c r e e n s h o t      T a k e   a   s c r e e n s h o t
p a t h = < f i l e n a m e >    -   O u t p u t   f i l e   p a t h

It makes CLI help text and command output basically unreadable.

This looks related to the terminal/code-font fallback behavior discussed in #18311 and the lack of a terminal font setting mentioned in #10620, but it is not fixed for me on the current desktop build.

Version / environment

  • Codex Desktop: 26.415.40636
  • Bundle build: 1799
  • macOS: 26.4.1 (25E253)
  • Machine: MacBook Air
  • Repo/workspace where I noticed it: cloudmac

What I checked

  • ~/.codex/config.toml does not contain a terminal font override.
  • The terminal output itself is normal ASCII/help text; this appears to be renderer/font fallback/layout behavior, not the CLI emitting spaced characters.
  • Local font scan shows system monospace fonts like Menlo/Monaco available, but the Codex terminal still renders incorrectly.

Expected behavior

The app terminal should use a sane monospace fallback and render normal terminal output without huge letter spacing.

If Codex depends on a specific bundled/configured code font, missing fonts should not silently produce broken terminal rendering. Either bundle the needed font, fall back to a known-good system monospace font like Menlo/SF Mono, or expose a terminal/code font setting in Desktop.

View original on GitHub ↗

15 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #17348

Powered by Codex Action

zkendall · 2 months ago

Yep, I have the same problem.

abstrakt8 · 2 months ago

Seems like it's fixed in: Version 26.422.62136 (2180)

Thanks!

romeuesteve · 2 months ago

As a workaround, switching Codex Desktop’s code font to Cascadia Mono instead of the default ones fixes it immediately.

ilgaur · 2 months ago

This is not still fixed, I'm on 26.513.313313 (2867).

tomerzcod7 · 2 months ago

Still not fixed for me as well on the latest

k4vrin · 1 month ago

Same problem here. it's not fixed

Tswatery · 1 month ago

<img width="2276" height="212" alt="Image" src="https://github.com/user-attachments/assets/b215a1e2-a09b-48d3-b725-0e7b83d061a4" />

<img width="1724" height="288" alt="Image" src="https://github.com/user-attachments/assets/151f0a34-5ab7-4a4c-8969-f26f318a6446" />

Adding another current data point with screenshots attached above.

Environment

  • Codex Desktop: 26.519.41501 (3044)
  • Bundle id: com.openai.codex
  • Electron framework: 42.1.0
  • macOS: 15.6 (24G84)
  • Arch: arm64 / Apple Silicon
  • Shell shown in the screenshots: fish

What I verified

This still reproduces for me on the current Desktop build. The terminal output itself is not inserting spaces; it is rendered with excessive character spacing/tracking inside the Codex Desktop terminal. The same shell text is normal outside the app.

I tried the workaround mentioned above, but it did not fix this machine:

  • Installed Cascadia Mono successfully. The font is visible to the system/fontconfig (fc-match 'Cascadia Mono' resolves to CascadiaMono.ttf).
  • Also tried system fonts such as Menlo and Monaco via Codex Desktop's Appearance / Code font setting.
  • Restarted Codex after changing fonts.
  • Cleared the Electron/Chromium rendering caches under ~/Library/Application Support/Codex (GPUCache, DawnGraphiteCache, DawnWebGPUCache, Code Cache, Cache) and restarted.

The issue is unchanged after all of the above.

Relation to #17348

#17348 looks related at the Desktop terminal renderer layer, but the visible symptom here is different:

  • #17348: stale redraw / leading character duplication while editing input, e.g. git visually becoming ggit.
  • This issue: global glyph spacing is wrong for all terminal output, including static shell welcome text and prompt text.

So this feels less like a prompt/plugin input redraw issue and more like a font metrics / renderer measurement / fallback-font problem.

Possible root cause

A plausible failure mode is that the embedded terminal measures character cells before the configured code font is actually available, then caches an incorrect glyph width. After that, switching fonts or restarting the terminal view may keep using the bad metrics. This would match the appearance: the text content is correct, but every character is laid out as if the cell width is much larger than the glyph.

Other related possibilities:

  • xterm.js or the terminal renderer receives a font family via a CSS variable/fallback chain and measures a fallback font instead of the final resolved font.
  • The terminal is created before document.fonts.ready / document.fonts.load(...) completes.
  • The terminal does not fully re-measure/re-fit after Appearance -> Code font changes.
  • A global or inherited CSS rule such as non-normal letter-spacing is affecting the terminal rows.
  • Canvas/WebGL renderer glyph metrics are initialized against the wrong font and are not invalidated after the font changes.

Possible fixes to consider

  • Wait for the resolved terminal/code font to be loaded before creating or measuring the terminal, e.g. wait on document.fonts.ready and/or explicitly document.fonts.load(...) for the configured font.
  • Pass a concrete resolved fontFamily string to the terminal renderer instead of a CSS custom property or unresolved fallback chain.
  • Explicitly set/verify terminal letterSpacing: 0 or CSS letter-spacing: normal for the terminal viewport/rows.
  • On startup and after Appearance -> Code font changes, force a terminal re-measure + refresh + fit rather than only updating the setting.
  • Add a small regression check that renders a known monospace string in the Desktop terminal and verifies that character cell positions are uniform and not excessively spaced.

Why I could not send a targeted PR

I cloned openai/codex locally and searched for the Desktop terminal/webview implementation (@xterm, new Terminal, fontFamily, letterSpacing, codeFontFamily, etc.). The public repo appears to contain the CLI/TUI/app-server/Rust side, but not the source for the Desktop webview terminal renderer that is producing the screenshots here.

The installed app package does contain bundled webview assets such as app.asar -> webview/assets/terminal-*.js, but those are packaged/minified app artifacts rather than the corresponding source in this repository. Because of that, I could not identify a source file in this repo where a precise fix PR could be made.

Happy to test a nightly/dev build or a workaround flag if there is one. At the moment, the Cascadia Mono workaround and cache clearing do not resolve it on this setup.

joaqo · 1 month ago

Still broken, can't use lazygit in codex terminal

natehippocratic · 1 month ago

still broken, also fixed by switching my code font in settings > appearance > code font

singularitti · 1 month ago

The line spacing is larger than 1, which caused powerline symbols to break between lines.

<img width="154" height="90" alt="Image" src="https://github.com/user-attachments/assets/5316e1dd-581b-45a8-8298-690f07bc961a" />

alankatanoisi · 1 month ago

@Tswatery @Ahmet-Dedeler

I just fixed mine 2 minutes ago (FINALLY!), and hopefully this fixes it for everyone else. Here were the exact steps I took:

  1. Whatever your Light/Dark/System Appearance Theme settings are in Codex, toggle to the opposite. E.g., if you're in Dark Mode, go to the Light Theme and vice versa. If you've been using both Themes interchangeably, I'm not sure if this will work btw
  1. Next, click "Copy theme" from the toggled Theme.
  1. Switch back to your default Theme, and click "Import."
  1. Paste the copied theme into the Import input, click "Import theme."
  1. Check your Terminal to see if the font width/spacing has reset (ignore the other theme settings for now).

BEFORE:

<img width="600" height="119" alt="Image" src="https://github.com/user-attachments/assets/b4331d60-1c40-4804-9ac5-11f6f5d9554b" />

AFTER:

<img width="1195" height="247" alt="Image" src="https://github.com/user-attachments/assets/42421396-2a4e-4ec7-aaf8-0f57a732a787" />

---------------

Hope this helps!

FWIW, here are my fixed settings:

codex-theme-v1:{"codeThemeId":"codex","theme":{"accent":"#0169cc","contrast":100,"fonts":{"code":null,"ui":"source code pro"},"ink":"#0d0d0d","opaqueWindows":false,"semanticColors":{"diffAdded":"#00a240","diffRemoved":"#e02e2a","skill":"#751ed9"},"surface":"#ffffff"},"variant":"light"}

-------------------------

UPDATE: Figured out the problem (TL;DR: if you played around with the fonts, it looks like :

<img width="1303" height="167" alt="Image" src="https://github.com/user-attachments/assets/e14a78db-56da-4f85-8806-f4e338c7b0f4" />

[!TIP] GOOD:
"fonts":{"code":null,"ui":"source code pro"}
[!WARNING] BAD:
"fonts":{"code":"\"Geist Mono\", ui-monospace, \"SFMono-Regular\"","ui":"source code pro"}

PS: I'm new to github and programming, idk if this is not the proper way to provide tips lol

ymykhailova · 1 month ago

Fixed by removing whatever font was set in the theme, so it falls back to the default:
<img width="701" height="601" alt="Image" src="https://github.com/user-attachments/assets/f6e11a04-f875-42ba-96e8-497981a0ced5" />

alankatanoisi · 1 month ago
Fixed by removing whatever font was set in the theme, so it falls back to the default: <img width="701" height="601" alt="Image" src="https://github.com/user-attachments/assets/f6e11a04-f875-42ba-96e8-497981a0ced5" />

Whoa wait what, that Code Font input section wasn't in my Codex build UI yesterday.

It is exactly THAT setting that I know is messing the terminal font, and none of us had been able to change it because.

Why do I not have that box?

!image

murabcd · 1 month ago

use this. it’s clearer and includes the exact fix

looks like the issue is related to how the codex terminal handles ui-monospace. so in codex settings → appearance → code font, i removed ui-monospace and after reopening the terminal, the spacing looked normal again

before:

"Geist Mono", ui-monospace, "SFMono-Regular"

<img width="647" height="131" alt="Image" src="https://github.com/user-attachments/assets/c19c5cd4-636e-436c-96a6-0b30fb314edd" />

after:

"Geist Mono", "SFMono-Regular"

<img width="637" height="132" alt="Image" src="https://github.com/user-attachments/assets/f4a92562-5378-4308-b9da-d9f4fab783b9" />