Desktop app stuck in cloud-only mode; local sessions ignored even with `codexCloudAccess=disabled`

Resolved 💬 12 comments Opened Feb 3, 2026 by roodboi Closed Feb 4, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

Codex Desktop: 260202.0859 (build 517)

What subscription do you have?

ChatGPT Pro

Which model were you using?

N/A

What platform is your computer?

macOS: 26.2 (arm64)

What terminal emulator and version are you using (if applicable)?

_No response_

What issue are you seeing?

Codex Desktop shows only cloud threads (personal workspace) and ignores local sessions even when local mode is forced in ~/.codex/.codex-global-state.json. CLI can resume local sessions, but the desktop UI does not list them. This persists across reinstalls, cache resets, and build changes.

What steps can reproduce the bug?

  1. Ensure local sessions exist at ~/.codex/sessions/.../*.jsonl
  2. Open Codex Desktop.
  3. Sidebar shows only cloud threads from personal workspace.
  4. Force local mode:
  • codexCloudAccess = disabled
  • environment = null
  • sidebar-workspace-filter-v2 = all
  • Lock file (chflags uchg ~/.codex/.codex-global-state.json)
  1. Restart Codex Desktop.
  2. Result: still only cloud threads; local sessions never appear.

What is the expected behavior?

Local sessions under ~/.codex/sessions appear in the sidebar when codexCloudAccess is disabled (and/or when “All threads” is selected).

Actual
UI only shows cloud threads. Local sessions are ignored. Changing CLI auth to another workspace doesn’t affect the desktop UI.

Additional information

Evidence

  • Local sessions exist and are written by the app:
  • Example: ~/.codex/sessions/2026/02/03/rollout-2026-02-03T13-40-28-019c24ce-590a-7e42-b2e3-efe508ee3731.jsonl
  • Latest session_meta.source = appServer
  • CLI can resume them (codex resume) without issues.
  • Desktop app continues to show only cloud threads.

What I already tried

  • Reinstall older + latest builds
  • Clear app caches:
  • ~/Library/Application Support/Codex
  • ~/Library/Caches/com.openai.codex
  • ~/Library/Preferences/com.openai.codex.plist
  • Rebuild history.jsonl from sessions
  • Convert .jsonl to .json (copies)
  • Force onboarding override
  • Force local mode in .codex-global-state.json and lock file
  • Full Disk Access enabled for Codex
  • Result unchanged

Desktop UI appears to ignore local sessions even when local mode is forced. It may be stuck in cloud-only list mode or failing to query local thread list from app-server.

Here are the fully anonymized snippets with fake paths and user:

Sanitized state (selected keys, fake paths)

{
  "codexCloudAccess": "disabled",
  "environment": null,
  "sidebar-view-v2": "threads",
  "sidebar-workspace-filter-v2": "all"
}
active-workspace-roots: [
  "/Users/me/dev/project-1",
  "/Users/me/dev/project-2",
  "/Users/me/dev/project-3",
  "/Users/me/dev/project-4",
  "/Users/me/dev/project-5",
  "/Users/me/dev/project-6",
  "/Users/me/.codex/workspaces/default"
]

Sanitized latest session_meta (fake user/path)

{
  "id": "019c24ce-590a-7e42-b2e3-efe508ee3731",
  "timestamp": "2026-02-03T18:40:28.938Z",
  "cwd": "/Users/me/.codex/workspaces/default",
  "originator": "Codex Desktop",
  "source": "appServer",
  "cli_version": "0.94.0-alpha.10"
}

Sanitized codex-tui.log excerpt (fake user/path)

2026-02-03T18:42:09.715497Z  INFO codex_core::rollout::recorder: Resuming rollout from "/Users/me/..."
2026-02-03T18:42:09.722553Z  INFO codex_core::rollout::recorder: Resumed rollout successfully from "/Users/me/..."

View original on GitHub ↗

12 Comments

etraut-openai contributor · 5 months ago

Are you able to create new local sessions from within the app?

roodboi · 5 months ago

I can but they do not persist within the app if it reloads. I can see those sessions in the cli/cursor app etc but the desktop app resets back to cloud only sessions on every reload.

etraut-openai contributor · 5 months ago

Hmm, very strange. By any chance, are you using CODEX_HOME to define a custom location for your codex directory? I presume not based on your post above, but just want to confirm.

roodboi · 5 months ago

Indeed. no CODEX_HOME, just the default ~/.codex

etraut-openai contributor · 5 months ago

We're trying to find a repro case for this, and we have some working theories. By any chance, do you have a custom model provider defined in your config.toml? Do you have any other non-default config.toml settings?

etraut-openai contributor · 5 months ago

@human-bee, I deleted your post because it included some details that you probably don't want publicly shared. Make sure to redact details like access tokens when posting to github.

human-bee · 5 months ago

hah thanks. sorry. i had already cycled them, i do often because of how often .env.local is read. but i appreciate it.

<img width="246" height="921" alt="Image" src="https://github.com/user-attachments/assets/f09d732c-b170-4c63-8f47-d7d1ee12bc82" />

config:

model = "gpt-5.2-codex"
model_reasoning_effort = "high"
approval_policy = "never"
sandbox_workspace_write.network_access = true
sandbox_mode = "danger-full-access"
tool_output_token_limit = 45000
web_search = "live" 
personality = "pragmatic"

[features]
rmcp_client = true
unified_exec = true
shell_snapshot = true
collab = true
steer = true

[profiles.deep-review]
model = "gpt-5-pro"
model_reasoning_effort = "high"
approval_policy = "never"

[projects."/Users/bsteinher/Cursor Tools"]
trust_level = "trusted"

[projects."/Users/bsteinher/PRESENT"]
trust_level = "trusted"

[mcp_servers.chrome-devtools]
command = "npx"
args = ["chrome-devtools-mcp@latest"]
enabled = true

[mcp_servers.supabase]
command = "npx"
args = ["-y", "@supabase/mcp-server-supabase@latest", "--project-ref=<REDACTED>"]

[mcp_servers.supabase.env]
SUPABASE_ACCESS_TOKEN = "<REDACTED>"

[mcp_servers.apify]
url = "https://mcp.apify.com"
enabled = false

[mcp_servers.sentry]
url = "https://mcp.sentry.dev/mcp"
enabled = false

[mcp_servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]

[mcp_servers.github.env]
GITHUB_PERSONAL_ACCESS_TOKEN = "<REDACTED>"

[mcp_servers.codex-cli-mcp]
command = "codex"
args = ["mcp-server"]
enabled = false

[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
enabled = true

[mcp_servers.trigger]
command = "npx"
args = ["trigger.dev@latest", "mcp"]
enabled = false

[mcp_servers.playwright]
args = ["@playwright/mcp@latest"]
command = "npx"

[notice]
hide_gpt5_1_migration_prompt = true
"hide_gpt-5.1-codex-max_migration_prompt" = true

[notice.model_migrations]
"gpt-5.2" = "gpt-5.2-codex"
roodboi · 5 months ago

I was able to restore the Desktop threads in app.

Timeline

  1. Initially, only Codex Desktop threads showed in app and looked normal.
  2. After an app reset/restart, all threads disappeared.
  3. Tried sanitizing/quarantining oversized sessions (base64/image‑heavy), then CLI/VSCode threads started showing up in app, but desktop threads were still missing.
  4. Normalized session metadata for desktop sessions (session_meta.source from appServervscode, leaving originator="Codex Desktop" unchanged).

→ After a full restart, all desktop threads reappeared.

What I tried

  • Verified sessions exist and parse under ~/.codex/sessions
  • Expanded active-workspace-roots in .codex-global-state.json
  • Removed persisted cloud environment pinning
  • Quarantined/sanitized large base64/image sessions
  • Rebuilt history.jsonl + thread-titles
  • Full quit/reopen cycles

What worked

  • Normalizing Codex Desktop session metadata: source="appServer"source="vscode", then restarting.

Possible repro (best‑effort, not fully confirmed)

  1. Create multiple desktop sessions across project roots.
  2. Include some large payloads (images/long outputs).
  3. Restart the app.
  4. Observe missing desktop threads; on disk, sessions still exist with

originator="Codex Desktop" + source="appServer".

Observations / logs

  • Intermittent MCP server errors appeared in logs during the missing‑threads window (not confirmed causal).
  • Pulled logs from ~/.codex/log and checked app local storage at:
  • ~/Library/Application Support/Codex/Local Storage
  • ~/Library/Application Support/Codex/Session Storage
  • Did see a crash log with an auth refresh error: TokenRefreshFailed: Invalid client (timing overlapped with the missing‑threads window, not confirmed causal).
  • Backed up all session files and global state before quarantining/sanitizing or rewriting metadata, so can share diffs of original vs. fixed files if that would help.

Config (sanitized, no custom model provider)

model = "gpt-5.2-codex"
model_reasoning_effort = "high"

[features]
unified_exec = true
steer = true
collaboration_modes = true

[sandbox_workspace_write]
network_access = true

# multiple trusted projects
[projects."..."]
trust_level = "trusted"

# MCP (tokens removed)
[mcp_servers.github]
command = "bunx"
args = ["-y", "@modelcontextprotocol/server-github"]
enabled = true

[mcp_servers.github.env]
GITHUB_PERSONAL_ACCESS_TOKEN = "<REDACTED>"

[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
enabled = true

[mcp_servers.shadcn]
command = "bunx"
args = ["shadcn@latest", "mcp"]
enabled = true

[mcp_servers.magic]
command = "bunx"
args = ["-y", "@21st-dev/magic@latest", "API_KEY=<REDACTED>"]
enabled = true

[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
enabled = true
bam4564 · 5 months ago

Also facing this exact same issue! Here is my codex config if that's helpful. Let me know if you want any other information about my setup. My setup should be pretty stock, haven't done much other that enable web search in the config file

model = "gpt-5.2-codex"
model_reasoning_effort = "high"
web_search = "live"

personality = "friendly"
sandbox_mode = "danger-full-access"
approval_policy = "never"
[projects."/Users/brycemorrow/Documents/code/current/magic-lines"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/current/portfolio"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/hourglass-foundation/stable-pre-deposit"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/hourglass-foundation"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/hourglass-foundation/hourglass-backend"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/hourglass-foundation/stack/hourglass-infrastructure"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/hourglass-foundation/stack"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/hourglass-foundation/stack/hourglass-backend"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/hourglass-foundation/stack/hourglass-backend/.git/modules/packages/cli"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/CodexMonitor"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/tools/CodexMonitor"]
trust_level = "trusted"

[projects."/Users/brycemorrow/Documents/code/hourglass-foundation/stack/stable-iusdt"]
trust_level = "trusted"

[mcp_servers.effect-docs]
command = "npx"
args = ["-y", "effect-mcp@latest"]

[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]

[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"

[mcp_servers.playwriter]
command = "npx"
args = ["-y", "playwriter@latest"]

[features]
unified_exec = true
shell_snapshot = true
collab = true
steer = true
collaboration_modes = true
apps = false
human-bee · 5 months ago

@etraut-openai do you recommend i do what @roodboi did to resolve this?

@roodboi - any side effects? are those sessions that you sanitized re-visitable?

roodboi · 5 months ago

@human-bee the sanitize/quarantine stuff was me debugging, not a fix — I was just trying to see what was blocking indexing and whether I could surface any useful clues from my setup.

Sanitizing only made some CLI/VSCode threads show up but desktop threads didn’t return until I tweaked source/originator

It also had side effects: I hit invalid_encrypted_content (looks like compacted chunks), and deleting those can make the session too big/unstable, but fixed by re‑compacting with /compact.

I wouldn’t recommend trying to sanitize/mess with session meta etc. unless you have backed everything up and are okay with possible partial data loss.

That being said i do have my threads back in the UI now and haven't run into the issue again with any my new threads. The initial problem happened on previous builds: cli: 94 and app: 260202.0859 (build 517) and Im on cli: 95 and app: 260203.1501 (523) now.

human-bee · 5 months ago

This is resolved in the latest update for me. Version 260204.1342 (531). macOS 26.2 (25C56).