Skip to content

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

Open

Description

@alexchexes

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:

keyviz_2026-03-28--18-44-56--992.mp4

Copilot:

keyviz_2026-03-28--18-54-43--442.mp4

Activity

  1. added
    extension
    on Mar 28, 2026
  2. added
    bug
    on Mar 28, 2026
  3. github-actions commented on Mar 28, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  4. alexchexes commented on Apr 1, 2026

    @alexchexes
    Author

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

    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.

  5. alexchexes commented on Apr 6, 2026

    @alexchexes
    Author

    Any chance we see any reaction here, please?

  6. alexchexes commented on Apr 16, 2026

    @alexchexes
    Author

    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.

  7. Fona1347 commented on May 10, 2026

    @Fona1347

    +1 same here

  8. alexchexes commented on May 11, 2026

    @alexchexes
    Author

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

  9. wwk990630 commented on Aug 23, 2026

    @wwk990630

    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.

  10. Naz-Ovh commented on Oct 11, 2026

    @Naz-Ovh

    Font-size changes aren’t showing up for me in 26.51007.21434 either, while other chat extensions pick them up. I haven’t confirmed whether a theme change or an unrelated settings edit triggers it in my case.

    Thanks for sharing the refresh workaround. Does it also help when the configured size doesn’t appear to apply initially?

  11. alexchexes commented on Oct 12, 2026

    @alexchexes
    Author

    Does it also help when the configured size doesn’t appear to apply initially?

    @Naz-Ovh No, not sure, that didn't happen for me that way, including on the latest 26.1007.21434. The reason could be something else, like workspace settings overriding it or some extension getting in the way. Give Claude/Codex a task to diagnose that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions