Skip to content

Codex Desktop falls back to English UI when started offline - i18n gated behind server config enable_i18n (default false) #52471

Open

Description

@zhangdagen666

What version of the Codex App are you using?

26.1002.52244 (package OpenAI.Codex_26.1002.7124.0_x64__2p2nqsd0c76g0, prod channel, installed from Microsoft Store)

What platform is your computer?

Microsoft Windows 11 家庭版 中文版 (10.0.26200, Build 26200) x64

System region: zh-CN, preferred UI language: zh-Hans-CN

What issue are you seeing?

Codex Desktop renders its UI in English when the app is launched without a working connection to OpenAI, even though:

  • the UI language is set to 中文(中国)/ zh-CN,
  • the locale pack is already bundled inside the app (app.asar contains zh-CN-b05cfd55c534.js ~2.5 MB and zh-Hans-6d9213662c0b.js),
  • the local config correctly stores the override:
[desktop]
localeOverride = "zh-CN"

As soon as the app is launched with a working proxy/VPN (so that it can reach OpenAI at startup), the same installation renders in Chinese. Turning the proxy off and restarting brings the English UI back. No restart-with-network is needed after the initial launch: the language stays Chinese for the lifetime of the process.

What steps can reproduce the bug?

  1. Settings > General > Language: select 中文(中国)(zh-CN), confirm config.toml gets [desktop] localeOverride = "zh-CN".
  2. Fully quit Codex (tray > Quit).
  3. Start Codex with a network path that cannot reach OpenAI (e.g. direct connection without proxy).
  4. The UI renders in English. Log shows the backend is unreachable, e.g.:
warning [electron-message-handler] sa_server_request_failed ... errorMessage="Workspace routing is unavailable"
warning [AppServerConnection] app_server_connection.transport_connect_failed errorMessage="Sign in to ChatGPT to start a durable thread."
  1. Quit Codex, enable the proxy/VPN, start it again — the UI is now Chinese.

Expected behavior

The UI should be rendered in the selected language as soon as it is selected, including offline starts, since both the preference and the locale pack are available locally.

Root cause (from inspecting the shipped bundle)

The i18n path is gated behind a dynamically fetched config, and the gate defaults to disabled when the config is unavailable. In app.asar (minified):

function RYs(e){
  ...
  s = En(`72216192`),                       // server-provided dynamic config
  c = s?.get(`enable_i18n`, false);         // missing config => false => English UI
  ...
}

The locale resolution logic directly below it would happily use the local override or the system locale, but it never runs when enable_i18n is false.

Workaround

Start the app once with a working proxy/VPN, then keep the process running (e.g. disable the system proxy afterwards). The language persists until the app is restarted.

Suggested fix

Either default enable_i18n to true on desktop, or honor a non-empty localeOverride with the bundled locale packs and no network dependency.


中文摘要(可贴在 issue 末尾或作为补充)

界面语言被一个在线开关 enable_i18n 控制,取不到配置时默认 false,于是离线启动一律回退英文;但语言包本来就在本地(app.asar 内的 zh-CN-*.js),config.toml 里的 localeOverride = "zh-CN" 也已生效。开代理启动一次即恢复中文,说明只差这一个开关。建议桌面端把 enable_i18n 默认设为 true,或在 localeOverride 非空时直接用本地语言包。


Related open issues with the same symptom: #19239, #23815. This report adds the offline/online correlation and the code-level cause (enable_i18n defaulting to false); feel free to consolidate it into those threads if you prefer.

Activity

  1. added
    bug
    app
    connectivity
    on Oct 9, 2026
  2. gehai46 commented on Oct 10, 2026

    @gehai46

    Follow-up with code-level confirmation. I filed the symptom-level report in #51074 before
    isolating the cause; the same machine and the same config file produce the A/B below.

    Environment

    • Windows 10 Pro 26H2, build 26300.9550, x64; system UI language zh-CN
    • Package OpenAI.Codex_26.1007.2314.0_x64__2p2nqsd0c76g0; release reported in logs 26.1007.21434
    • ~/.codex/config.toml contains [desktop] localeOverride = "zh-CN", and that line is never
      removed or rewritten by either run below

    Decisive observation

    One installation, one config file, only the network path changes:

    Cold start (2026-10-10, UTC+08:00) Path browser_use_availability_resolved UI language
    15:55 through a local proxy available=true ... reason=available release=26.1007.21434 Simplified Chinese
    17:01 direct, no proxy available=false ... reason=statsig-disabled release=26.1007.21434 English

    Nothing else differs. The saved localeOverride is present and identical in both runs, so the
    symptom is network-triggered rather than version-triggered.

    Bundle review of this exact build

    The locale provider gates the loader on a server-delivered dynamic config whose default is
    false:

    s = n0e(`72216192`),
    c = s?.get(`enable_i18n`, false),        // config unavailable => false
    ...
    k = () => { let e = !1; return l && (async () => {
            if (y) try { let t = await y7i(y); ... }
            catch { gr.error(`Failed to load locale messages`, { safe: { locale: y.locale }, sensitive: {} }) }
          })(), () => { e = !0 } }

    The same config key defaults to true in the settings picker:

    // Settings > General > Language
    r = Pn(`72216192`)?.get(`enable_i18n`, true)

    Two different defaults for one key reproduce the symptom in the original report exactly: the
    dropdown keeps listing 中文(中国) because the picker defaults to enabled, while the loader that
    would actually apply it defaults to disabled. Selection appears to save and never takes effect.

    Pointers that may save triage time

    • The failing call is POST https://chatgpt.com/backend-api/wham/statsig/bootstrap, issued as
      safePost('/wham/statsig/bootstrap', { requestBody: e, retry: false, signal: t }). It is
      single-shot, so one slow body read degrades the session with no retry.
    • 432 "Workspace routing is unavailable" on /settings/user and /wham/usage is a red herring
      for this bug. It is present in the proxied session too, where statsig succeeded and the UI was
      Chinese. It does not discriminate between the two states.
    • Locale loading never fails in the logs: there is no Failed to load locale messages entry, and
      app.asar ships .vite/build/locales/zh-CN.json plus the webview zh-CN-*.js chunk. Missing
      resources are not involved.
    • Main-process locale resolution also works correctly; it resolves zh-CN while native strings
      stay English, which is the "value resolved, value unused" signature reported here.

    Separate defect, worth tracking independently

    AppxManifest.xml in 26.1007.2314.0 still declares a single resource language:

    <Resources>
      <Resource Language="en-US" />
    </Resources>

    That is a real packaging issue (see #51926 and #52800) affecting the system-locale path. It cannot
    explain the A/B above, since it does not change with the network path.

    Timeline

    Logs on this machine only go back to 2026-10-04, so I cannot speak to earlier builds. Across
    26.930.31730, 26.930.41038, 26.930.61225, 26.1002.51308, 26.1002.52244 and
    26.1007.21434, both reason=available and reason=statsig-disabled appear, including different
    outcomes on the same build within the same hour. The outcome is not pinned to any one build.
    The report in #50377, observed 2026-10-02 to 10-03, is the earliest occurrence I can point at.

    Workaround verified here

    Start the app once on a path that can reach chatgpt.com, then keep the process running. The UI
    stays in the selected language for the lifetime of the process, and the proxy does not need to
    stay on afterwards. Restarting without such a path brings English back.

    Requested fix

    Honour a non-empty localeOverride using the bundled catalogs with no network dependency, or
    default enable_i18n to true on desktop.


    中文摘要

    同一台机器、同一版本 26.1007.2314.0、同一份 config.toml,只更换网络路径即可复现:走代理时
    reason=available,界面为简体中文;直连时 reason=statsig-disabled,界面为英文。原因是语言加载器
    里 enable_i18n 的默认值为 false,而设置页语言选择器的同一配置默认值为 true,于是选项可见、选中无效。
    localeOverride 与本地语言包都正常,日志中也没有语言包加载失败。另有 MSIX 清单只声明 en-US 的独立打包
    缺陷(见 #51926、#52800),与本条成因不同,需分开修复。

  3. welger commented on Oct 13, 2026

    @welger

    Why "launch once online" does not survive an offline restart: the Statsig evaluations cache never persists (localStorage QuotaExceededError)

    The reports above establish that the UI is localized only when enable_i18n is available at startup. One question was still open: why doesn't a successful online launch carry over to the next offline launch? The Statsig client in the renderer has storage enabled and reads statsig.cached.evaluations.* before it hits the network, so the last-known values should be served from cache. They aren't, because the cache write always fails.

    Environment

    • Package OpenAI.Codex_26.1007.2314.0_x64__2p2nqsd0c76g0, release 26.1007.21434, Chromium 155.0.8059.40
    • Bundled Statsig JS SDK 3.34.0
    • Windows, custom model provider (API key), not signed in with ChatGPT
    • [desktop] localeOverride = "zh-CN" present; no [analytics] override, so renderer storage is enabled (disableStorage is unset on the client)

    Method

    The app was launched in its package context with --remote-debugging-port (via Invoke-CommandInDesktopPackage, so the data directory does not change). I inspected __STATSIG__.firstInstance in the primary window, wrapped Storage.prototype.setItem to record every write, and triggered a refresh with updateUserAsync(currentUser).

    Result (network reachable)

    update:  success=true, source=Network
    setItem  statsig.cached.evaluations.<hash>   5,336,996 chars   QuotaExceededError
    setItem  statsig.last_modified_time.evaluations   55 chars     ok
    setItem  statsig.cached.evaluations.<hash>   5,336,996 chars   QuotaExceededError
    ...      (5 failed attempts in total)
    setItem  statsig.last_modified_time.evaluations   2 chars ("{}")   ok
    

    After the refresh, localStorage holds only statsig.session_id.*, statsig.stable_id.* and an empty ledger statsig.last_modified_time.evaluations = {}. No evaluations are ever written to disk.

    Chromium caps localStorage at 10 MiB per origin, stored as UTF-16, which is about 5,242,880 characters. The serialized cache record is 5,336,996 characters, about 1.8% over the limit.

    This is how the SDK's _writeToCache handles it (the code is identical in the earlier 26.730 bundle; only the payload size changed):

    for (let t = 0; t < c; t++) try {
      Storage.setItem(key, value); break;              // throws QuotaExceededError every time
    } catch (t) {
      if (!isQuotaError(t) || this._cacheLimit <= 1) throw t;
      this._cacheLimit = Math.ceil(this._cacheLimit / 2);              // 10 -> 5 -> 3 -> 2 -> 1
      this._runLocalStorageCacheEviction(key, this._cacheLimit - 1);   // last pass evicts with limit 0
    }

    The last eviction pass runs with limit 0. It removes every entry in the ledger, including any previously cached value under the same key, and leaves the ledger as {}. The error is silent: nothing about it appears in the desktop logs.

    What fills the payload

    key chars
    dynamic_configs 4,544,961 (~91%)
    layer_configs 272,210
    feature_gates 154,739
    everything else < 2,000
    total data 4,973,409

    The layer behind localization (72216192 → { "enable_i18n": true, "locale_source": "IDE" }) is a single small entry inside layer_configs.

    Consequence

    Every launch without a working path to OpenAI starts with NoValues. That means enable_i18n is false (English), and every other gate falls back to its default too. On this machine that also brings back the older navigation layout and removes Approve for me from the permissions menu, which matches the symptoms in #50377.

    Control experiment: the cache-read path works; only the size breaks it

    1. Offline: I wrote a trimmed record (2,098 chars) under the same cache key. It contained the real metadata, with feature_gates and dynamic_configs emptied and layer_configs reduced to 72216192. The SDK's own _loadFromCache returned it with source: Cache.
    2. Offline cold start: the UI rendered in Chinese, and the layer reason was Cache:Recognized. The layout was still the older one, since every other gate was at its default.
    3. One online launch: the full payload hit the quota loop above, and the final eviction deleted the seeded record.
    4. Offline cold start again: English, NoValues.

    So the offline fallback is already designed to work. It is defeated only because the full evaluations payload no longer fits in localStorage.

    Relation to #50377

    The same oversized payload is probably also why the post-login bootstrap misses its fixed 10 s deadline on slower links, as reported there. I have not measured that directly.

    Possible fixes (from the outside; you will know better)

    1. Persist evaluations through a store that isn't bound by the localStorage quota. The SDK already supports a custom storageProvider (for example IndexedDB, or a file through the main process).
    2. Shrink what gets cached: dynamic_configs is about 91% of it. Or additionally persist a small allowlist of startup-critical values (locale, navigation layout, permission presets) that always fits.
    3. Honour a non-empty localeOverride from the bundled catalogs without depending on enable_i18n, as already requested above.
    4. At minimum, log the QuotaExceededError. It is currently swallowed, which makes this very hard to diagnose from user reports.

    On builds from late August we saw the evaluations cache present on disk, and the localized UI persisted offline. I did not measure the payload size on those builds, so I can't say exactly when it crossed the threshold.


    中文摘要

    「联网启动一次」之所以撑不到下一次断网启动,是因为 Statsig 的开关缓存从来没有写进磁盘。

    在 26.1007.2314.0 里实测:联网拉取成功,但缓存记录有 5,336,996 个字符,超过 Chromium localStorage 每个源约 5,242,880 字符的上限(超出约 1.8%),连续 5 次 QuotaExceededError。SDK 的减半重试最后按上限 0 淘汰,把账本清成 {},而且不留任何日志。

    数据里 dynamic_configs 占约 91%。汉化开关 72216192 只是其中很小的一项。

    对照实验:断网时只写入裁剪后 2,098 字符的记录,断网冷启动界面就是中文(Cache:Recognized);联网启动一次,这条记录就被同一个配额循环删掉,再断网又变回英文。这说明离线读缓存的路径本身是好的,只是数据太大存不下。

    建议的修法:换用不受 localStorage 配额限制的 storageProvider;精简缓存内容,或单独持久化启动所需的少量关键值;localeOverride 不依赖 enable_i18n;至少把配额错误记进日志。

  4. WU928-spec commented on Oct 15, 2026

    @WU928-spec

    Adding a macOS data point to the root-cause side of this, on 26.1007.71326 (build 20398), macOS 14.8.3 arm64, system language zh-Hans-CN:

    The UI stays English while the machine has a working route to OpenAI, so this is not only the offline case described above. Confirmed at startup through a working proxy: the app's own processes connect to chatgpt.com, chat.openai.com and ab.chatgpt.com, and api.openai.com is reachable (401 without a key). Network is not the variable here — the gate still resolves to false.

    The likely cause is a default mismatch between the two call sites in Contents/Resources/app.asar:

    // provider that injects locale/messages for the UI
    c = s?.get(`enable_i18n`, !1);                // default false
    // Settings page
    r = Pn(`72216192`)?.get(`enable_i18n`, !0);   // default true

    So unless the server explicitly returns enable_i18n: true for 72216192, the UI renders English defaultMessages and every local lever (localeOverride = "zh-CN", --lang=zh-CN, changing the picker) is a no-op. The zh-Hans strings are bundled in app.asar (verified), so it is not a missing-translation problem either.

    Full macOS repro and the things that were tried are in #19239.

  5. 4x25 commented on Oct 16, 2026

    @4x25

    Confirming the same defect on macOS, with a cache angle that lines up with @welger's Windows findings.

    Environment: Codex App 26.1013.31256 (Chromium base 155.0.8059.80), macOS Darwin 27.0.0 arm64. One installation, one config.toml; only the network path changes.

    A/B (cold starts):

    • Direct network: ab.chatgpt.com -> connection reset (curl exit 35), chatgpt.com/backend-api -> connect timeout after 8s. Every cold start renders English; changing the language in Settings writes [desktop] localeOverride but never changes the UI.
    • Through a local proxy (127.0.0.1:7890): both hosts answer (403 without auth). The UI localizes a moment after launch (brief English -> localized flash, i.e. the bundled locale chunk loads right after the gate resolves) and stays localized for the process lifetime.

    Both call sites read the same layer. In this build, general-settings-fd634ec6c16e.js imports Or from app-initial-3ccf4886957f.js as a re-export of the same getLayer helper (dWt as oDr in the bundle's export table). So the picker lists languages (?.get('enable_i18n', true)) while the provider that actually injects messages uses false, for the exact same 72216192 layer: the option is always selectable and the write always succeeds even when the value can never be applied.

    Cache state on this macOS install (matches @welger's conclusion):

    • The live Local Storage LevelDB currently holds statsig.session_id.*, statsig.stable_id.* and an empty statsig.last_modified_time.evaluations ledger ({}). There is no statsig.cached.evaluations.* for the current identity, so every launch starts from NoValues.
    • Historical tables (compacted away during 2026-10-16 16:40; the LOG shows a compaction down to 554 bytes / 9 keys) did contain cached entries, e.g. key statsig.cached.evaluations.3217092736 with source: "Network", receivedAt 2026-06-01, and layer_configs["72216192"] = {"enable_i18n": true, "locale_source": "IDE"}. The cache write path used to work on macOS; today nothing survives.
    • The post-login bootstrap path is memory-only by design: dataAdapter.setData(payload) + initializeSync(), and the SDK's setData writes to its in-memory cache only - nothing hits storage. Combined with the above, an offline cold start always falls back to the enable_i18n default.

    On the 432 noise: agreed it is orthogonal - this machine logged 477 "Workspace routing is unavailable" (status 432) events today, including while the proxy was on and the UI localized.

    The requested fix (honor a non-empty localeOverride from the bundled catalogs without the gate, and/or default enable_i18n to true on desktop) resolves every variant above; the workaround (start once on a reachable network path) keeps matching across reports.

  6. arriannayfq commented on Oct 25, 2026

    @arriannayfq

    Additional Windows reproduction on 2026-10-25: the app started before its local proxy was ready, the post-login Statsig bootstrap exhausted its retries, and the selected Chinese UI did not recover afterward.

    Environment:

    • Windows 11 Pro, version 10.0.22621, x64
    • App release reported by logs: 26.1021.31345
    • Microsoft Store package: OpenAI.Codex_26.1021.3705.0_x64__2p2nqsd0c76g0
    • Current persisted setting: [desktop] localeOverride = "zh-CN"
    • Running renderer processes include --lang=zh-CN.

    Observed timeline (UTC+08:00):

    • 19:39:05: desktop app process started.
    • 19:39:35–19:39:37: four logged POST /wham/statsig/bootstrap failures with errorCode=ERR_PROXY_CONNECTION_FAILED.
    • 19:39:58: "Statsig: error while bootstrapping post-login client", attemptNumber=6, "Timed out while fetching post-login Statsig bootstrap".
    • 19:40:58: the local proxy process started. Its listening port was confirmed available later.
    • The app remained usable for running tasks, but its sidebar and in-window menu labels remained English.

    The exact installed bundle still contains:

    • A language picker that reads config 72216192 / enable_i18n with a true fallback.
    • An i18n provider that reads the same value with a false fallback and skips loading/passing translated messages when it is false.
    • Initial post-login bootstrap retries capped at five request retries; after failure the provider enters its fallback path. The initial-bootstrap effect only starts when its mutation status is idle.

    Resource checks:

    • native-menu-locales/zh-CN.json exists and parses (220 entries).
    • webview/assets/zh-CN-bd2cd8444335.js exists (2,961,780 bytes).
    • Both assets match the SHA-256 integrity values recorded in the installed ASAR header.

    Recovery attempts:

    • The user had already rebooted the computer, with the same English UI.
    • During language switching, the saved override was found as zh-HK; it was corrected to zh-CN and read back successfully. This did not restore the live UI.
    • Opening this diagnostic chat in a separate window also remained English.
    • Active tasks were preserved; no app restart, cache clearing, sign-out, binary modification, or global proxy change was performed during this investigation.

    Interpretation: the startup proxy failure is directly observed. The code path strongly supports missing post-login localization config as the cause, but the live enable_i18n value was not read, and a successful authenticated bootstrap after network recovery has not been established. An anonymous connectivity probe is not evidence that the authenticated bootstrap works.

    Please make bundled desktop localization honor the saved language without depending on a successful online bootstrap, and provide an automatic retry or a scoped "retry configuration" action after network recovery that does not require interrupting running tasks.

  7. cyberianin commented on Oct 27, 2026

    @cyberianin

    Follow-up: Windows 10 / Codex Desktop 26.1021.3705.0 — workspace routing failure at startup, non-recovering post-login Statsig bootstrap, and potential stale localization caches

    I investigated a real occurrence of this issue on October 27, 2026, using the installed Windows application's startup logs, shipped JavaScript bundles, and the source code corresponding to the installed Rust app-server version.

    Russian localization was restored after a normal application restart. No installed files, account data, caches, or network routes were modified.

    The investigation identified a specific startup failure and several code-level mechanisms that can prevent localization from recovering after connectivity or account routing has been restored.

    1. Environment

    • OS: Windows 10 Enterprise LTSC 21H2, x64.
    • MSIX package: OpenAI.Codex_26.1021.3705.0_x64__2p2nqsd0c76g0.
    • Rust app-server: 0.164.0-alpha.11.1.
    • Selected UI language: Russian (ru-RU).
    • Persisted setting: [desktop] localeOverride = "ru-RU".
    • Renderer launch arguments: --lang=ru.
    • Installed ASAR archive: app/resources/app.asar, approximately 610 MB.

    The Russian localization resources are present. Resolving the issue did not require changing the language preference or installing additional translation resources.

    Initially, most of the UI remained in English despite the saved Russian preference. After restarting Codex at approximately 07:41 UTC, the main navigation elements and menus appeared in Russian.

    2. Comparison of failed and successful startups

    All timestamps below are in UTC on October 27, 2026.

    Event Failed startup Successful startup
    React root initialization 06:18:53 07:42:00
    App-server ready 06:18:54 07:41:57
    account/read 06:18:56 — JSON-RPC -32603, 56 ms 07:42:01 — successful, 9 ms
    Workspace discovery workspace routing discovery failed No corresponding error
    Initial Statsig bootstrap Workspace routing is unavailable error No bootstrap error observed in the primary window
    Account lookup 06:19:03 — accounts_request_failed 07:42:06 — authenticatedAccountPresent=true
    Main UI language English fallback Russian

    Important observation: in the original process, account lookup recovered at approximately 06:28:34, and account/read completed successfully at approximately 06:28:41. Nevertheless, the primary window continued displaying English.

    The application regained the ability to perform authenticated account operations, but the already-mounted UI did not recover the selected localization.

    Russian localization appeared after a normal restart.

    3. Initial failure: workspace routing discovery in Rust

    I examined the Rust source code corresponding to app-server version 0.164.0-alpha.11.1.

    Sources:

    When stored ChatGPT authentication is available, the app-server calls get_accounts_check() to discover the routing information for the selected workspace.

    The relevant Rust error handling is effectively structured as follows:

    match client.get_accounts_check().await {
        Ok(response) => break response,
        Err(error) => {
            let unauthorized = error.is_unauthorized();
    
            // HTTP 401-specific recovery occurs here.
    
            return Err(if unauthorized {
                WorkspaceRoutingError::DiscoveryUnauthorized
            } else {
                WorkspaceRoutingError::DiscoveryFailed
            }
            .into());
        }
    }

    Therefore, the logged workspace routing discovery failed message establishes that get_accounts_check() failed with an error not classified as HTTP 401.

    Other conditions, including a missing workspace and an account change, have separate error variants.

    Depending on the backend configuration, the request uses one of the following paths:

    • /wham/accounts/check
    • /api/codex/accounts/check

    The request can fail because of transport problems, non-401 HTTP errors, or an invalid response body.

    The exact underlying error cannot be determined for this incident. The nested RequestError was converted into the generic DiscoveryFailed, and the Desktop log retained only the resulting message.

    The initial account/read failed in 56 ms. This was not the 15-second timeout path, and the app-server connection had already been established.

    The locally generated status=432 with the message Workspace routing is unavailable, subsequently observed in the Desktop HTTP bridge, was not an HTTP response from the Statsig server. It was a local consequence of the failure to discover workspace routing.

    Additionally, attachAuth=true indicates the intention to attach authentication credentials; it does not confirm that the remote server accepted the account-check request.

    4. Network observations — suggestive but inconclusive

    During the first 50 seconds of the failed startup, the local logs contained:

    • 44 ENOTFOUND entries.
    • 2 ERR_NAME_NOT_RESOLVED entries.

    No equivalent entries were found in the comparable initial interval of the successful startup.

    This supports the hypothesis of a transient DNS or network failure during initialization. However, these errors also involved other destinations. They do not establish that DNS caused the failure of the specific /accounts/check request.

    5. Post-login Statsig bootstrap does not automatically restart after recovery

    Relevant installed bundle:

    initialize-app-host-services-b944587b60fb.js

    In this build, the function identified as lO creates a mutation through Vn, using mutationFn: uO and retry: false.

    The observed control flow is:

    1. The mutation initially has status idle.
    2. The lO effect invokes mutate when status === "idle".
    3. On success, the status becomes success, and the resulting client is used.
    4. On failure, the status becomes error, and lO switches to the asynchronous fallback mechanism identified as aO.
    5. No reset() or error → idle transition was found in the inspected failure branch.

    The mutation status is included in the effect dependencies. However, a subsequent successful account/read does not itself reset the mutation to idle or trigger a new post-login bootstrap.

    Consequently, a normal rerender after account recovery does not restart the initial post-login bootstrap. A new attempt becomes possible when lO is remounted or the mutation is explicitly reset.

    This error state is effectively terminal for the post-login mutation within the currently mounted lO component, not for Statsig as a whole. The separate asynchronous fallback path aO remains available and may obtain configuration values through its own lifecycle.

    An important clarification regarding retries: retry: false disables retries at the mutation layer. The underlying uO function separately implements bounded retries for certain errors, using two counters with limits of five. Therefore, it would be incorrect to claim that the entire bootstrap always performs only one HTTP request.

    In the failed primary window, the log recorded one unsuccessful post-login bootstrap attempt at the outer level. After account routing recovered, no evidence of a new successful post-login bootstrap was found in that window.

    This is a concrete recovery deficiency in the post-login bootstrap lifecycle: successful restoration of workspace routing does not, by itself, restart the failed mutation in the already-mounted lO component. It does not establish that all other Statsig configuration-loading paths are permanently disabled.

    6. values_updated does not guarantee updated localization data

    Two related issues were also identified in the shipped JavaScript.

    Relevant bundles:

    • app-initial-438d1df57f70.js — Statsig provider and layer wrapper (VLt).
    • initialize-app-host-services-b944587b60fb.js — localization provider (FO).

    The Statsig integration does subscribe to the values_updated event. This subscription increments renderVersion and updates the getLayer callback.

    However, the Codex wrapper (VLt) caches the returned layer by client instance, layer key, and parameters. Its cache dependencies do not include renderVersion or the updated getLayer callback.

    The localization provider (FO) then memoizes the result of:

    layer.get("enable_i18n", false)

    using the layer object reference as its dependency.

    This allows the following sequence:

    1. The existing Statsig client has no usable localization configuration.
    2. enable_i18n evaluates to false.
    3. The Statsig client later receives a values_updated event.
    4. React rerenders, but the layer wrapper may return the previously cached layer object.
    5. The localization provider observes the same layer reference.
    6. The memoized enable_i18n value may remain false.

    The issue is therefore not simply the absence of a Statsig subscription. The subscription exists, but updated values are not included in the dependencies of the two memoization layers.

    This potential stale-cache mechanism was identified through static inspection of the installed build.

    Its actual occurrence in the affected window has not been established. The logs do not record whether values_updated occurred, whether the layer reference changed, or what the effective enable_i18n value was.

    Therefore, the caching issue is a concrete code-level mechanism consistent with the observed behavior, not a proven cause of this particular incident. The failure to repeat the original post-login bootstrap is a separate possible reason the primary window never received updated configuration through that path.

    7. Localization unnecessarily depends on remote configuration

    The localization provider reads:

    layer.get("enable_i18n", false)

    When the value is false, it skips loading and providing localized messages.

    Meanwhile, the language selector uses a default value of true for the same feature flag, as already documented in this issue.

    As a result, the user can select ru-RU, and the preference can be persisted correctly, while the component responsible for applying the translation does not load it.

    The Russian language catalog is already available locally. Temporary unavailability of remote configuration should not prevent an explicitly selected language from being applied when its resources are bundled with the application.

    8. Proposed minimal fixes

    I recommend treating these as three independent changes.

    A. Remove the dependency of bundled localization on temporary Statsig unavailability

    When the user has explicitly selected a supported localeOverride and the required translations are bundled with the application, load them without requiring a successful network bootstrap or an enable_i18n=true response.

    If the feature flag must be retained for other functionality, its semantics should not allow the settings UI to offer a language that the renderer silently refuses to apply.

    B. Invalidate Statsig-derived values on values_updated

    Include renderVersion or another suitable update generation in the layer cache dependencies in VLt.

    Ensure the localization provider recomputes enable_i18n when the underlying Statsig values change, even if the client instance remains unchanged.

    Normal React rerenders should not trigger additional network requests.

    C. Recover post-login bootstrap after workspace routing becomes available again

    When the account or workspace transitions into a confirmed working state, allow a bounded, deduplicated retry of the failed post-login mutation.

    This could be implemented using an explicit mutation reset followed by a controlled invocation, or through an equivalent lifecycle state transition.

    This change should coexist correctly with the asynchronous fallback path aO, without causing duplicate configuration requests.

    Unbounded retry loops and network requests on every render must be avoided.

    9. Regression tests

    The fixes should cover at least the following scenarios:

    Test Expected result
    Startup with functioning account routing and Statsig The selected language loads normally
    Startup with unavailable Statsig/workspace routing and ru-RU selected Bundled Russian translations still load
    Bootstrap failure followed by successful account/read recovery without restarting Post-login bootstrap recovers through a bounded retry
    values_updated event on the same Statsig client Dependent layer and localization values are updated
    Rerender without a Statsig update No unnecessary bootstrap requests are performed
    Change the selected UI language The correct bundled translation catalog is applied

    10. Verified outcome and remaining uncertainty

    Confirmed through observation:

    • Workspace routing discovery failed during initial startup.
    • The failed account/read preceded the unsuccessful Statsig bootstrap.
    • Account and workspace operations later recovered within the same process.
    • Despite this recovery, the primary window remained in English.
    • A normal application restart restored Russian localization.
    • No changes to user state or installed application files were necessary.

    Confirmed through code inspection:

    • A get_accounts_check() error not classified as HTTP 401 is converted into DiscoveryFailed.
    • A subsequent successful account/read does not automatically reset the post-login mutation from error to idle in the currently mounted lO component.
    • The aO asynchronous fallback path is distinct from the failed post-login mutation.
    • Translation loading depends on enable_i18n, with a default value of false.
    • The identified cache dependencies permit stale Statsig-derived values to persist.

    Not confirmed:

    • The specific nested RequestError from the original /accounts/check request.
    • Whether a DNS failure caused that particular request to fail.
    • The actual enable_i18n value and the history of values_updated events in the original renderer.
    • Whether stale layer caches were actually responsible for the persistent English UI in this incident.
    • Whether the proposed fixes work after implementation.

    The presence of bundled Russian resources, the correctly persisted language setting, and the successful recovery after restart rule out a missing Russian language pack as the explanation for this incident.

    Conclusion

    The investigation establishes an initial workspace routing failure and identifies additional recovery mechanisms that could explain why localization remained in English afterward.

    1. Confirmed initial failure: workspace routing discovery.

    The failure originated in get_accounts_check(). Its exact underlying request error remains unknown because the nested error was not preserved in the logs.

    2. Observed localization recovery failure, with code-level explanations.

    The primary window remained in English even after account operations recovered.

    Static inspection identified two relevant limitations:

    • The failed post-login mutation remains in its error state while the existing lO component is mounted, unless explicitly reset. This does not disable the separate asynchronous Statsig fallback path.
    • The VLt and FO memoization dependencies can retain stale values after Statsig updates. Whether that specific stale-cache mechanism occurred in the affected window remains unverified.

    These mechanisms should be investigated and addressed independently rather than treating the caching hypothesis as an established explanation for the original incident.

    The practical workaround is to restart Codex after account routing or connectivity has recovered. This restores localization but does not address the underlying recovery deficiencies.

    Please consider a fix that makes bundled translations independent of remote configuration availability and allows post-login bootstrap and Statsig-dependent caches to recover automatically.

    All investigation of the installed application was performed in read-only mode. The installed MSIX/ASAR, .codex directory, project and session storage, and network routes were left unchanged.

  8. wsz211 commented on Nov 19, 2026

    @wsz211

    Still present in the latest build as of 2026-11-19: 26.1111.9664.0 (MSIX OpenAI.Codex_26.1111.9664.0_x64__2p2nqsd0c76g0, latest per the Microsoft Store catalog; the About dialog reports 26.1111.71704). The gate code is unchanged in this build — the LocaleProvider in webview/assets/async/907538.*.js still reads getDynamicConfig("72216192")?.get("enable_i18n", false) and skips loading messages when it is false.

    Datapoint for the signed-out / API-key case (Windows 11 Pro 10.0.26300 x64, display language zh-CN, [desktop] localeOverride = "zh-CN"):

    • The app is used without a ChatGPT account (forced_login_method = "api" with a third-party provider). In this mode the renderer never receives Statsig evaluations at all: the web profile's Local Storage only holds statsig.session_id.* / statsig.stable_id.* and an empty statsig.last_modified_time.evaluations ledger, no statsig.cached.evaluations.* anywhere, and no evaluation traces in ~/.codex either. So every cold start starts from NoValues — matching @welger's cache analysis, with the additional twist that for API-mode users there has never been a successful online launch to seed the cache in the first place.
    • Network specifics from this environment: ab.chatgpt.com and api.openai.com time out, chatgpt.com/backend-api/wham/statsig/bootstrap is unreachable; statsigcdn.openai.com completes TLS but returns 403 for a bare request. The "launch once with a proxy" workaround therefore requires infrastructure that most API-mode users in this region simply do not have.

    Request: for a non-empty localeOverride when no signed-in account can provide evaluations, honor the bundled catalogs locally without depending on enable_i18n — as already suggested above.

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

    appbugconnectivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions