UI settings not persisting when using custom model provider

Open 💬 0 comments Opened Jul 11, 2026 by zhu20110920

Bug Report: UI Settings Not Persisting with Custom Model Provider

Environment

  • OS: Windows 11
  • Codex Version: 26.707.31428
  • Model Provider: custom (bailian/qwen3.7-plus via local proxy)

config.toml

` oml
model_provider = "custom"
model = "qwen3.7-plus"
model_reasoning_effort = "high"
disable_response_storage = true
model_catalog_json = "cc-switch-model-catalog.json"

[model_providers]
[model_providers.custom]
name = "bailian"
base_url = "http://127.0.0.1:15721/v1"
wire_api = "responses"
requires_openai_auth = true

[desktop]
followUpQueueMode = "queue"

[windows]
sandbox = "elevated"
`

Problem

When using a custom model provider (not OpenAI), all UI settings under the "Personal" section (General, Appearance, Voice, Configuration, Personalization, Pet, Keyboard Shortcuts) reset to defaults every time the app is restarted.

What Works

  • ~/.codex/config.toml persists correctly (model, provider settings)
  • All installed skills persist (anysearch, superpowers, code-review-skill)
  • ~/.codex/AGENTS.md persists correctly
  • Conversation history persists (server-side)

What Doesn't Work

  • UI preferences (theme, layout, general settings) reset on every restart
  • WebView2 Local Storage (%LOCALAPPDATA%\com.ccswitch.desktop\EBWebView\Default\Local Storage\leveldb\) does not update after initial install date
  • Clearing Local Storage and Session Storage does not fix the issue

Root Cause Analysis

The Codex desktop app stores UI preferences in WebView2's Local Storage. When using a custom model provider, writes to Local Storage appear to fail silently. The Preferences file in the WebView2 profile updates normally, but the Local Storage/leveldb directory timestamp never changes from the install date, indicating writes are not being committed.

Steps to Reproduce

  1. Configure Codex to use a custom model provider (non-OpenAI)
  2. Change any UI setting (e.g., theme, appearance)
  3. Close and reopen Codex
  4. Observe that the setting has reverted to default

Expected Behavior

UI settings should persist across app restarts regardless of which model provider is configured.

Actual Behavior

UI settings reset to defaults on every app restart when using a custom model provider.

View original on GitHub ↗