codex - 💡(How to fix) Fix VS Code extension fails to hydrate thread when rollout JSONL ends with dangling task_started [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#20392Fetched 2026-05-01 05:43:29
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

What version of the IDE extension are you using?

0.126.0-alpha.8, 26.422.71525

What subscription do you have?

Pro

Which IDE are you using?

VS Code

What platform is your computer?

Ubuntu 24.04

What issue are you seeing?

The UI appears to assume every task_started has a terminal event. If the UI/process exits or disconnects mid-turn, the rollout remains syntactically valid JSONL but semantically incomplete, and hydration fails instead of tolerating/recovering from the dangling turn.

What steps can reproduce the bug?

A Codex thread failed to hydrate/open in the UI. Inspecting the local Codex state showed:

  • session_index.jsonl referenced the thread normally
  • state_5.sqlite integrity_check returned ok
  • the thread rollout JSONL parsed cleanly with jq
  • however, the rollout ended with a task_started event and assistant commentary, but no matching task_complete or turn_aborted for that final turn

Appending a task_complete event for the dangling turn made the UI hydrate the thread again.

What is the expected behavior?

The UI should hydrate the thread even if the final turn is incomplete, probably treating the final dangling task_started as interrupted/aborted, or repairing it on load. After appending a task_complete event for the dangling turn, hydration worked again.

Additional information

No response

extent analysis

TL;DR

The UI should be modified to handle incomplete turns by treating the final dangling task_started as interrupted or aborted, allowing the thread to hydrate even when the final turn is incomplete.

Guidance

  • The issue is likely caused by the UI's assumption that every task_started event has a corresponding terminal event, which is not always the case when the UI/process exits or disconnects mid-turn.
  • To verify the issue, inspect the local Codex state and check if the rollout JSONL ends with a task_started event without a matching task_complete or turn_aborted event.
  • To mitigate the issue, the UI could be modified to automatically append a task_complete event for dangling turns when loading the thread, similar to the manual workaround described.
  • The UI's hydration logic should be updated to tolerate or recover from semantically incomplete JSONL data, rather than failing when encountering a dangling turn.

Example

No code snippet is provided as the issue does not contain sufficient information about the UI's implementation details.

Notes

The provided information suggests that the issue is specific to the UI's handling of incomplete turns, and the workaround of appending a task_complete event for dangling turns is effective in resolving the issue.

Recommendation

Apply workaround: The recommended solution is to modify the UI to handle incomplete turns by treating the final dangling task_started as interrupted or aborted, allowing the thread to hydrate even when the final turn is incomplete. This approach is based on the provided workaround and the expected behavior described in the issue.

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…

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 VS Code extension fails to hydrate thread when rollout JSONL ends with dangling task_started [1 comments, 2 participants]