Codex chat font size visually resets after unrelated settings.json changes

Open 💬 7 comments Opened Mar 28, 2026 by alexchexes
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the IDE extension are you using?

26.325.31654

What subscription do you have?

Plus

Which IDE are you using?

VS Code

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What issue are you seeing?

When I save any unrelated change in settings.json, Codex chat visually resets to the old smaller font size, even though "chat.fontSize" and "chat.editor.fontSize" remain unchanged in the saved file.

This looks extension-specific on my setup: Copilot Chat still respects the same settings correctly, while Codex chat does not.

What steps can reproduce the bug?

  1. In VS Code settings.json, set "chat.fontSize": 20 and "chat.editor.fontSize": 20.
  2. Open Codex chat and confirm the font size is larger.
  3. Change an unrelated setting such as "workbench.colorTheme" in settings.json and save. You can also change the theme from the Command Palette to reproduce the same effect.
  4. Codex chat visually falls back to the smaller font size, even though those two settings are still set to 20.

What is the expected behavior?

Codex chat should continue using the saved chat font size after unrelated settings.json edits.

Additional information

I opened this here first instead of VS Code because I tested another chat extension in the same VS Code setup and it behaves as expected. Below are screencasts showing both behaviors for comparison.

If this should be reported in microsoft/vscode instead, please let me know and I can repost it there.

Codex:

https://github.com/user-attachments/assets/25e884ae-b3fc-420a-ac6c-bf76e1f58a25

Copilot:

https://github.com/user-attachments/assets/ad695d69-4f74-45b1-91bf-0120eff004d8

View original on GitHub ↗

7 Comments

github-actions[bot] contributor · 5 months ago

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

  • #15417
  • #14738

Powered by Codex Action

alexchexes · 4 months ago
Potential duplicates detected. Please review them and close your issue if it is a duplicate. Codex chat font size is too small in the VS Code extension #15417 Support changing font family in IDE Extension #14738 _Powered by Codex Action_

I'm not sure if I should add a reply to this to ensure this issue is at least being triaged, but I will just in case:

It is not a duplicate of those issues. The font-reset problem wasn't reported before.

alexchexes · 4 months ago

Any chance we see any reaction here, please?

alexchexes · 4 months ago

Workaround

Since OpenAI doesn't pay any attention to this severe accessibility issue, users have to figure out workarounds themselves. Here's one to mitigate this at least partially:

First, install the extension that allows adding keybindings for arbitrary VSCode settings:

https://marketplace.visualstudio.com/items?itemName=robertohuertasm.vscode-settings-keybindings

Then add this to your keybindings.json (replace 16 to the font size you need, and ctrl+shift+alt+f12 with any hotkey you like):

  // CODEX fontSize ISSUE WORKAROUND (https://github.com/openai/codex/issues/16117)
  {
    "key": "ctrl+alt+shift+f12",
    "command": "runCommands",
    "args": {
      "commands": [
        {
          "command": "vscode-settings-keybindings.setSetting",
          "args": {
            "key": "chat.fontSize",
            "value": 14,
          },
        },
        {
          "command": "vscode-settings-keybindings.setSetting",
          "args": {
            "key": "chat.editor.fontSize",
            "value": 14,
          },
        },
        {
          "command": "vscode-settings-keybindings.setSetting",
          "args": {
            "key": "chat.fontSize",
            "value": 16,
          },
        },
        {
          "command": "vscode-settings-keybindings.setSetting",
          "args": {
            "key": "chat.editor.fontSize",
            "value": 16,
          },
        },
      ],
    },
  },

Then, whenever the chat size unexpectedly resets due to the bug described in this issue, just press the shortcut you added, and the chat size is back to the desired one again without reloading the chat webview.

Fona1347 · 3 months ago

+1 same here

alexchexes · 3 months ago

@Fona1347 you can hit 👍 on the issue text - that sometimes matters if maintainers sort issues by it

wwk990630 · 5 days ago

I was able to reproduce the theme-change variant of this issue and validate an automated workaround using only the public VS Code Extension API.

What I observed

  • After changing the VS Code color theme, the saved chat.fontSize value remains unchanged, but Codex can render the chat text at a smaller visual size.
  • Updating chat.fontSize through WorkspaceConfiguration.update(), briefly changing it by 1 px, and then restoring the exact original value makes Codex reapply the correct size.
  • This suggests the normal chat.fontSize configuration-change path refreshes the rendered font correctly, while the theme/webview redraw path does not always reapply the current value.
  • The workaround does not modify Codex files, inject CSS/JavaScript, access the webview DOM, or use private APIs.

I packaged the tested workaround as a small open-source extension:

Extension behavior

  • Installation, activation, and window reload do not change the user's font size or apply a default value.
  • It runs only after an actual VS Code color-theme change, or when the user explicitly runs Codex Font Keeper: Refresh Font.
  • By default it waits 300 ms for the theme redraw, temporarily changes the current effective font size by 1 px for 100 ms, and then restores the exact original value and configuration scope.
  • Rapid theme changes are debounced, and concurrent refreshes are guarded.

This is a community workaround rather than an internal Codex fix.

Possible upstream fix

After the Codex chat/webview is re-themed or reinitialized, re-read and reapply the current chat.fontSize (and, if applicable, chat.editor.fontSize) after the theme styles/variables have been applied. Another option would be to invoke the same font-refresh path used for a chat.fontSize configuration-change event after a theme change.

That should avoid requiring a synthetic configuration toggle and may also address the broader settings-change cases reported in this issue.