Codex Desktop cannot archive sessions created in UTC+8 due to local-time rollout filenames
What version of the Codex App are you using (From “About Codex” dialog)?
0.148.0-alpha.15
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64; timezone Asia/Taipei (UTC+8)
What issue are you seeing?
On Windows in the Asia/Taipei (UTC+8) timezone, archiving some Codex Desktop threads fails with:
failed to archive session: thread-store internal error: failed to archive thread: The system cannot find the file specified. (os error 2)
The session metadata timestamp is stored in UTC, but the rollout filename is generated with local time. When a thread is no longer loaded (for example after an app restart), the archive operation appears to reconstruct or look up the source filename using the UTC timestamp, so it cannot find the local-time-named file.
Example (IDs and user paths redacted):
- Session metadata timestamp:
2026-08-19T10:17:47Z - Actual rollout filename timestamp:
2026-08-19T18-17-47 - Time difference: +8 hours, matching Asia/Taipei
- Archive lookup fails with
os error 2
This reproduced across four separate threads created on the same machine. Three were forked/branched threads, but one affected root thread had no forked_from_id, so branching is not required to trigger the bug.
A newly created, currently loaded thread also has the same UTC/local-time filename mismatch but may still archive successfully while its actual path is cached in memory. The failure appears more likely after restart or when the thread status becomes notLoaded.
What steps can reproduce the bug?
- Run Codex Desktop on Windows with the system timezone set to Asia/Taipei (UTC+8).
- Create a new local Codex thread. A fork/branch is not required.
- Let the thread finish.
- Restart Codex so the thread is no longer loaded (observed status:
notLoaded). - Attempt to archive the thread from the sidebar or through the app's archive action.
- Observe
thread not foundor the thread-storeos error 2.
Inspection of the local session shows that the JSONL session metadata uses a UTC timestamp while its rollout filename uses local time.
Workaround that confirmed the root cause:
- Back up the session.
- Rename the rollout file from its local-time timestamp to the corresponding UTC timestamp.
- Retry the native archive action.
- The archive succeeds immediately and the thread appears in the archived list.
No session IDs or personal paths are included here because they are not required to reproduce the timestamp mismatch.
What is the expected behavior?
Codex Desktop should archive the thread successfully regardless of the operating-system timezone. Session creation and archive lookup should use the same timestamp basis (preferably UTC), or archive lookup should use the stored session path/ID instead of reconstructing a filename from a timestamp.
Additional information
Observed with Codex App / embedded CLI version 0.148.0-alpha.15.
Four affected threads all had rollout filenames exactly eight hours ahead of the UTC timestamps in their session metadata. One was a root thread with no forked_from_id; the other three were forked descendants. This rules out branching as a necessary cause.
The same +8-hour filename mismatch is also present on a newly created, currently loaded root thread. This suggests the archive failure may depend on the thread being unloaded or the app having restarted: a loaded thread can use its cached actual path, while a notLoaded thread may reconstruct the path from the UTC metadata timestamp.
After correcting each affected filename to UTC, the built-in archive action returned success and the threads appeared in the archived list.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce the same pattern on Windows UTC+8, and my local evidence matches the UTC-vs-local rollout filename hypothesis.
Details from one affected local Codex task:
01a00ed1-77d0-7381-bb3a-ab2dea1ff3ef.notLoaded, butread_threadstill works and shows the latest turn completed successfully..codex/sessions/....archived_sessionsexists, but no archived copy for this thread is created.thread-writer-lockshas no lock for this thread.Timestamp mismatch for the same thread:
The filename is exactly +8 hours from the UTC metadata timestamp. This is the same task that fails archive with
os error 2, while the source JSONL file exists. I have not modified SQLite or renamed the rollout file on this machine, so this is just an additional reproduction data point rather than a workaround confirmation.Independent reproduction
I found a strong independent reproduction consistent with #39575 on Windows, using the Europe/Paris timezone rather than Asia/Taipei. This is a retrospective sample of 39 old automation-created threads.
Environment
Observations
archived = 0.PRAGMA integrity_checkreturnsok.rollout_pathbeginning withC:\....\\?\C:\....\\?\prefix cannot explain the general failure in this sample.Timestamp pattern
For 39/39 rollout files:
session_meta.payload.timestampis UTC;The invariant observed across the full sample is:
rollout filename timestamp = session_meta.payload.timestamp converted to Europe/Paris, truncated to secondsAn anonymized example:
rollout-2026-05-27T20-02-08-<thread-id>.jsonlwith:
session_meta.payload.timestamp = 2026-05-27T18:02:08.132ZThe direct subtraction is
+01:59:59.868because the filename omits milliseconds; after truncating the metadata timestamp to seconds, the offset is exactly+02:00:00.Why this matters
This suggests that the behavior described in #39575 is not specific to UTC+8 and is also reproducible in Europe/Paris at UTC+2, across a substantially larger sample.
It also affects threads whose stored Windows paths are otherwise normal. The four
\\?\paths may combine two separate defects, but the 35 normal paths isolate the local-time/UTC filename mismatch from the path-prefix issue.This is a strong independent reproduction consistent with #39575, but not definitive causal proof.
No local modification performed
This investigation was read-only. No rollout file was renamed, no JSONL content was changed, no SQLite row or archive flag was modified, and the causal rename workaround described in #39575 has not been attempted on this dataset.
I can provide additional anonymized aggregate details if useful to the maintainers.