What version of Codex are you running?
Codex Desktop for macOS 26.429.30905 (2345)
App-server / CLI version observed in local thread metadata: 0.128.0-alpha.1
What platform is your computer?
- macOS
26.4.1 (25E253)
- Apple Silicon /
arm64
What subscription do you have?
Pro
What issue are you seeing?
A side chat in Codex Desktop appears to have been half-created: it exists in the renderer/current UI and accepts some internal thread/inject_items / turn/start activity, but it is never persisted to state_5.sqlite and no rollout JSONL is written under ~/.codex/sessions. After that, trying to resume or fork from that side chat repeatedly fails with a toast:
Error creating task
failed to read thread: thread-store internal error: failed to read thread /Users/andywendt/.codex: Is a directory (os error 21)
Earlier, the parent chat itself also failed to resume with the same failed to read thread /Users/andywendt/.codex: Is a directory message until I manually restored the missing threads row in ~/.codex/state_5.sqlite from the existing rollout JSONL. The parent then opened again, but the right-hand side chat remained broken.
The important persisted-state mismatch for the broken side chat:
- Parent thread id:
019df0cd-d3f9-71a1-9009-c5cef1e161ab
- Parent rollout exists:
~/.codex/sessions/2026/05/03/rollout-2026-05-03T20-25-14-019df0cd-d3f9-71a1-9009-c5cef1e161ab.jsonl
- Broken side chat id:
019df0f2-d18e-7b02-8c91-38e76fbb5164
- No
threads row exists for 019df0f2-d18e-7b02-8c91-38e76fbb5164
- No rollout file exists for
019df0f2-d18e-7b02-8c91-38e76fbb5164
- A second nearby side chat id,
019df0f3-0e28-7f82-9afd-b4f997d4306b, shows the same missing persisted state
Commands used to verify:
sqlite3 -header -column ~/.codex/state_5.sqlite "select id, title, cwd, rollout_path, datetime(updated_at,'unixepoch') as updated from threads where id in ('019df0cd-d3f9-71a1-9009-c5cef1e161ab','019df0f2-d18e-7b02-8c91-38e76fbb5164','019df0f3-0e28-7f82-9afd-b4f997d4306b');"
find ~/.codex/sessions ~/.codex/archived_sessions -type f -name '*019df0f2*' -o -name '*019df0f3*'
The sqlite3 query returns only the repaired parent row. The find command returns no files for either side-chat id.
Relevant log excerpts from ~/Library/Logs/com.openai.codex/2026/05/04/codex-desktop-d7d022b7-4d32-470e-b4cb-92bb8439f867-40966-t0-i1-022505-0.log:
2026-05-04T03:05:38.547Z error [electron-message-handler] Conversation state not found conversationId=019df0f2-d18e-7b02-8c91-38e76fbb5164
2026-05-04T03:05:38.565Z info [AppServerConnection] response_routed ... method=thread/inject_items ... conversationId=019df0f2-d18e-7b02-8c91-38e76fbb5164 ... errorCode=null
2026-05-04T03:05:45.862Z info [AppServerConnection] response_routed ... method=turn/start ... conversationId=019df0f2-d18e-7b02-8c91-38e76fbb5164 ... errorCode=null
2026-05-04T04:14:55.842Z error [electron-message-handler] Request failed conversationId=019df0f2-d18e-7b02-8c91-38e76fbb5164 ... method=thread/fork ... error={"code":-32600,"message":"no rollout found for thread id 019df0f2-d18e-7b02-8c91-38e76fbb5164"}
2026-05-04T04:18:01.470Z error [electron-message-handler] Request failed conversationId=019df0f2-d18e-7b02-8c91-38e76fbb5164 ... method=thread/resume ... error={"code":-32603,"message":"failed to read thread: thread-store internal error: failed to read thread /Users/andywendt/.codex: Is a directory (os error 21)"}
Steps to reproduce
I do not have a minimal deterministic repro yet, but this happened during normal Codex Desktop side-chat usage:
- Open an existing Codex Desktop thread.
- Start a side chat from that thread.
- Run work in the side chat long enough that it receives
thread/inject_items and turn/start events.
- Later, try to resume the side chat or create a task/fork from it.
- The app shows
Error creating task or Failed to resume chat with failed to read thread /Users/<user>/.codex: Is a directory (os error 21).
Expected behavior
A side chat should be persisted atomically before the renderer can route turns to it. If persistence fails, the UI should not keep a side-chat tab that can later be resumed/forked but has no rollout path.
At minimum, thread/resume / thread/fork should fail with a direct missing-rollout or missing-thread-state error instead of falling back to reading ~/.codex as though it were a rollout file.
Additional context
The parent thread was recoverable because its rollout JSONL existed and only its threads row was missing. The side chat was not recoverable because neither the DB row nor the rollout file existed, even though app logs show it had received turns in the active UI.
What version of Codex are you running?
Codex Desktop for macOS
26.429.30905 (2345)App-server / CLI version observed in local thread metadata:
0.128.0-alpha.1What platform is your computer?
26.4.1(25E253)arm64What subscription do you have?
Pro
What issue are you seeing?
A side chat in Codex Desktop appears to have been half-created: it exists in the renderer/current UI and accepts some internal
thread/inject_items/turn/startactivity, but it is never persisted tostate_5.sqliteand no rollout JSONL is written under~/.codex/sessions. After that, trying to resume or fork from that side chat repeatedly fails with a toast:Earlier, the parent chat itself also failed to resume with the same
failed to read thread /Users/andywendt/.codex: Is a directorymessage until I manually restored the missingthreadsrow in~/.codex/state_5.sqlitefrom the existing rollout JSONL. The parent then opened again, but the right-hand side chat remained broken.The important persisted-state mismatch for the broken side chat:
019df0cd-d3f9-71a1-9009-c5cef1e161ab~/.codex/sessions/2026/05/03/rollout-2026-05-03T20-25-14-019df0cd-d3f9-71a1-9009-c5cef1e161ab.jsonl019df0f2-d18e-7b02-8c91-38e76fbb5164threadsrow exists for019df0f2-d18e-7b02-8c91-38e76fbb5164019df0f2-d18e-7b02-8c91-38e76fbb5164019df0f3-0e28-7f82-9afd-b4f997d4306b, shows the same missing persisted stateCommands used to verify:
The
sqlite3query returns only the repaired parent row. Thefindcommand returns no files for either side-chat id.Relevant log excerpts from
~/Library/Logs/com.openai.codex/2026/05/04/codex-desktop-d7d022b7-4d32-470e-b4cb-92bb8439f867-40966-t0-i1-022505-0.log:Steps to reproduce
I do not have a minimal deterministic repro yet, but this happened during normal Codex Desktop side-chat usage:
thread/inject_itemsandturn/startevents.Error creating taskorFailed to resume chatwithfailed to read thread /Users/<user>/.codex: Is a directory (os error 21).Expected behavior
A side chat should be persisted atomically before the renderer can route turns to it. If persistence fails, the UI should not keep a side-chat tab that can later be resumed/forked but has no rollout path.
At minimum,
thread/resume/thread/forkshould fail with a direct missing-rollout or missing-thread-state error instead of falling back to reading~/.codexas though it were a rollout file.Additional context
The parent thread was recoverable because its rollout JSONL existed and only its
threadsrow was missing. The side chat was not recoverable because neither the DB row nor the rollout file existed, even though app logs show it had received turns in the active UI.