codex - 💡(How to fix) Fix Codex Desktop shows stale last-edited age for local thread [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20479Fetched 2026-05-01 05:42:44
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Codex Desktop shows a stale "last edited" / relative-age value for a local thread even though the underlying session JSONL contains newer activity.

This looks related to existing session metadata split/sync issues, but the symptom here is narrower: the thread is visible, but the displayed recency is wrong.

Root Cause

IssueRelated symptomWhy this report is different
#16624VS Code task list drops valid sessions and shows a non-recency order.This thread is visible, but its displayed last-edited / relative-age value is stale compared with the latest timestamp in the rollout JSONL.
#16280Resume picker / name-based resume uses inconsistent metadata between session_index.jsonl and state_5.sqlite.This is not about rename or resume lookup; it is about the UI age being computed from stale metadata while newer session activity exists on disk.
#16385ACP-spawned sessions are written to JSONL/session index but do not appear in Desktop because storage paths do not sync.This session was visible in Desktop; the problem is that the recency metadata shown by the UI did not reflect later activity in the session file.

Code Example

Thread ID: 019dda12-8c8d-76a3-bce2-a510a1629f3c
UI displayed age: 1d
session_index.jsonl updated_at: 2026-04-29T16:29:21Z
latest timestamp in rollout JSONL: 2026-04-30T17:37:25Z
rollout file path shape: ~/.codex/sessions/YYYY/MM/DD/rollout-...-THREAD_ID.jsonl
RAW_BUFFERClick to expand / collapse

Attestation of Biological Origin: Codex helped draft this report; however, a verified carbon-based reviewer put down his coffee long enough to check it for correctness, reorganize it, and ensure the bot didn't hallucinate anywhere.

Related Issues and Difference

I found several existing issues about local session metadata, missing sessions, and non-recency ordering. This report may share the same underlying metadata-sync problem, but the visible symptom is narrower: a Desktop thread is present in the UI, yet the UI's relative "last edited" age is older than the latest activity recorded in the thread's rollout JSONL file.

IssueRelated symptomWhy this report is different
#16624VS Code task list drops valid sessions and shows a non-recency order.This thread is visible, but its displayed last-edited / relative-age value is stale compared with the latest timestamp in the rollout JSONL.
#16280Resume picker / name-based resume uses inconsistent metadata between session_index.jsonl and state_5.sqlite.This is not about rename or resume lookup; it is about the UI age being computed from stale metadata while newer session activity exists on disk.
#16385ACP-spawned sessions are written to JSONL/session index but do not appear in Desktop because storage paths do not sync.This session was visible in Desktop; the problem is that the recency metadata shown by the UI did not reflect later activity in the session file.

Description

Codex Desktop shows a stale "last edited" / relative-age value for a local thread even though the underlying session JSONL contains newer activity.

This looks related to existing session metadata split/sync issues, but the symptom here is narrower: the thread is visible, but the displayed recency is wrong.

What I observed

For one local thread, the UI showed an age of approximately 1d, but the session rollout file contained activity from today.

Screenshot evidence: the attached screenshot shows the d7-nes-working project with the Identify installed project thread displaying 1d in the right-side age column. That is the stale value.

<img width="414" height="229" alt="Image" src="https://github.com/user-attachments/assets/7901e07a-4701-45eb-b0a9-36a4f49e0380" />

Redacted local evidence:

Thread ID: 019dda12-8c8d-76a3-bce2-a510a1629f3c
UI displayed age: 1d
session_index.jsonl updated_at: 2026-04-29T16:29:21Z
latest timestamp in rollout JSONL: 2026-04-30T17:37:25Z
rollout file path shape: ~/.codex/sessions/YYYY/MM/DD/rollout-...-THREAD_ID.jsonl

The session content itself was current, and the rollout JSONL had newer entries. The likely cause is that the UI is using the stale index timestamp instead of the latest persisted session activity.

Expected behavior

The thread list should show recency based on the latest persisted activity for the thread, or the metadata index should be updated whenever the rollout/session JSONL receives new activity.

Actual behavior

The UI showed an older relative age even though the session file had newer activity.

Environment

  • Codex Desktop on macOS
  • Local storage inspected:
    • ~/.codex/session_index.jsonl
    • ~/.codex/sessions/.../*.jsonl
    • ~/.codex/state_5.sqlite

Privacy note

I am not attaching the full JSONL because it contains private session content, but the timestamps above are enough to show the mismatch.

extent analysis

TL;DR

The likely fix is to update the session index timestamp whenever new activity is written to the rollout JSONL file.

Guidance

  • Verify that the session_index.jsonl is being updated correctly by checking its updated_at timestamp after new activity is added to the rollout JSONL.
  • Check the code responsible for updating the session index to ensure it is using the latest timestamp from the rollout JSONL.
  • Consider adding a mechanism to refresh the session index when new activity is detected in the rollout JSONL.
  • Review the UI code to ensure it is using the correct timestamp (from the rollout JSONL or the updated session index) to display the relative age.

Example

No code snippet is provided as the issue does not contain enough information about the specific code implementation.

Notes

The issue seems to be related to a metadata sync problem, but the exact cause is unclear without more information about the code responsible for updating the session index and the UI.

Recommendation

Apply a workaround to update the session index timestamp whenever new activity is written to the rollout JSONL file, as this is the most likely cause of the stale relative age being displayed in the UI.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The thread list should show recency based on the latest persisted activity for the thread, or the metadata index should be updated whenever the rollout/session JSONL receives new activity.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop shows stale last-edited age for local thread [1 comments, 2 participants]