macOS Codex Desktop Settings show "Unable to save" for sandbox/approval config writes due to configVersionConflict

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

What version of the Codex App are you using (From “About Codex” dialog)?

Codex Desktop: 26.513.31313 Codex Desktop bundle version: 2867

What subscription do you have?

plus

What platform is your computer?

Platform: macOS 14.6.1, arm64

What issue are you seeing?

Changing user settings in Codex Desktop Preferences, especially sandbox / permissions / approval-related settings, repeatedly shows:

Unable to save

The config file itself is writable and can be manually edited. For example, manually adding this to $CODEX_HOME/config.toml works and is read by the CLI:

sandbox_mode = "workspace-write"

The CLI also parses the resulting config successfully.

Expected behavior

Codex Desktop Preferences should save sandbox/approval settings successfully.

If the config has changed since the Preferences page last read it, Desktop should recover by re-reading the latest config version and retrying the write, or by batching/serializing related writes so they use the current config version.

Actual behavior

Desktop Preferences reports Unable to save.

Desktop logs show repeated config/value/write failures with:

error={"code":-32600,"data":{"config_write_error_code":"configVersionConflict"},"message":"Configuration was modified since last read. Fetch latest version and retry."}
method=config/value/write

Redacted log evidence

The following snippets are from:

~/Library/Logs/com.openai.codex/2026/05/18/*.log

Sensitive identifiers and local details are not included beyond the generic method/error fields.

2026-05-18T04:56:31.437Z error [electron-message-handler] Request failed
error={"code":-32600,"data":{"config_write_error_code":"configVersionConflict"},"message":"Configuration was modified since last read. Fetch latest version and retry."}
method=config/value/write
2026-05-18T07:06:09.657Z error [electron-message-handler] Request failed
error={"code":-32600,"data":{"config_write_error_code":"configVersionConflict"},"message":"Configuration was modified since last read. Fetch latest version and retry."}
method=config/value/write
2026-05-18T07:10:09.537Z error [electron-message-handler] Request failed
error={"code":-32600,"data":{"config_write_error_code":"configVersionConflict"},"message":"Configuration was modified since last read. Fetch latest version and retry."}
method=config/value/write

There are many repeated occurrences across several Desktop log files from the same day.

What steps can reproduce the bug?

Reproduction steps

  1. Start Codex Desktop on macOS.
  2. Open Preferences / Settings.
  3. Change a setting that writes to $CODEX_HOME/config.toml, such as sandbox mode or approval-related settings.
  4. Observe that the UI shows Unable to save.
  5. Check ~/Library/Logs/com.openai.codex/....
  6. Observe config/value/write failures with config_write_error_code=configVersionConflict.

Workaround

Manually editing $CODEX_HOME/config.toml works. For example:

sandbox_mode = "workspace-write"

This confirms the problem is not a basic filesystem permission failure. It appears to be a Desktop Preferences/app-server config write version conflict.

What is the expected behavior?

_No response_

Additional information

will this be fixed in next codex app version

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 3 months ago

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

  • #23169
  • #22481

Powered by Codex Action

vkerin · 3 months ago

I can reproduce the same config write conflict on a newer macOS Codex Desktop build, and I have a bit more evidence that the setting may be partially persisted even while the UI keeps showing the stale-version error.

Environment:

  • Codex Desktop: 26.519.31651 (CFBundleVersion 3017)
  • Bundled CLI: codex-cli 0.133.0-alpha.1
  • macOS: 26.5 (25F71)
  • Architecture: arm64
  • Host: local Codex Desktop, user config scope

Reproduction:

  1. Open Codex Desktop Settings.
  2. Go to custom config.toml settings / user config.
  3. Toggle Allow network access under Workspace write.
  4. The UI shows:
Configuration was modified since last read. Fetch latest version and retry.

Observed behavior:

  • The UI continues to show the red error and does not appear to recover by fetching the latest config version.
  • However, the attempted toggle can still partially or fully persist underneath.
  • After toggling network access off in the UI, I observed all three local state sources change consistently to disabled:
# ~/.codex/config.toml
[sandbox_workspace_write]
network_access = false
// ~/.codex/.codex-global-state.json, current workspace/thread state
"networkAccess": false
-- ~/.codex/state_5.sqlite, active thread row
select json_extract(sandbox_policy, '$.network_access') ...
-- result: 0

Earlier in the same session I manually set the same three sources to enabled and verified:

  • config.toml had network_access = true
  • .codex-global-state.json had no bad current-workspace networkAccess != true records
  • state_5.sqlite had no current-workspace workspace-write thread rows with network_access != 1
  • codex doctor reported config load OK and sandbox network enabled

After using the Settings UI again, the value changed to false but the UI still displayed the config version conflict. That suggests the core issue is not just a file permission or SQLite persistence problem. The UI/app-server path appears to perform a write with a stale expectedVersion, then does not refresh/retry after the conflict, leaving the settings page stuck even when the underlying setting has changed.

I also inspected the packaged frontend bundle locally and found the Settings page path keeps a layer expectedVersion and passes it to write-config-value for the network toggle (sandbox_workspace_write.network_access). On conflict, the UI displays the error, but from observed behavior it does not refresh the config layer/version and retry.

Expected behavior:

  • On configVersionConflict, the Settings page should re-read the latest config layer/version and retry, or invalidate/refetch the config query before allowing another save attempt.
  • If a write has partially succeeded, the UI should reconcile with the actual persisted config instead of continuing to show a stale error state.
  • The user should be able to turn this setting on/off from Settings without needing manual edits or app restarts.

This is still reproducible in 26.519.31651 / 0.133.0-alpha.1.

Marabun · 3 months ago

I can reproduce this on a newer macOS Codex Desktop build, with an additional symptom: the Settings UI can partially persist the change, then keep rejecting subsequent user-initiated edits with the stale-version error.

Environment:

  • Codex Desktop: 26.521.10419
  • Codex CLI: 0.134.0
  • macOS: 26.5 (25F71)
  • Architecture: arm64
  • Scope: local Desktop app, User configuration (~/.codex/config.toml)

Reproduction observed:

  1. Open Codex Desktop Settings > Configuration.
  2. Select User configuration.
  3. Change approval policy / sandbox settings through the dropdowns.
  4. The UI shows:

``text
Configuration was modified since last read. Fetch latest version and retry.
``

  1. Closing and reopening Settings does not reliably recover the form state.
  2. Subsequent attempts to change the dropdowns can keep failing with the same stale-version message.

Observed state transitions from the local config file:

  • Initial intended state was:

``toml
approval_policy = "never"
sandbox_mode = "danger-full-access"
``

  • After trying to change values in the Settings UI, the config reached intermediate/changed states such as:

``toml
approval_policy = "on-request"
sandbox_mode = "danger-full-access"
``

and later:

``toml
approval_policy = "on-request"
sandbox_mode = "workspace-write"
``

  • codex doctor --summary then reported the changed effective mode, e.g. restricted fs + enabled network · approval OnRequest, confirming the file was modified despite the UI still showing the stale-version error.

Expected behavior:

  • If the Settings page writes one config value successfully, it should update its internal config version/revision before the next write.
  • If another process changes config.toml, the UI should provide a visible reload/refetch action or automatically refetch and retry the requested single-field update.
  • User-initiated dropdown changes in the official Settings UI should not leave approval_policy and sandbox_mode in a partially changed state.

This seems like the Settings page is keeping the original config read-version after either its own write or a nearby background config update, then treating the next user action as a configVersionConflict.