[BUG] VS Code Codex thread hangs during web/tool search and UI loses recent messages
What issue are you seeing?
In VS Code Codex, the thread hung while the assistant was doing web/tool search. After that, the UI appeared to lose the latest part of the conversation and only showed the beginning of the thread.
The session data was not fully lost: the missing turns were still present in the local session JSONL under ~/.codex/sessions/..., so this looks like a UI restore/reconnect/history rendering bug rather than total data loss.
I also hit a separate recurring compact error in the same environment:
Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)
What steps can reproduce the bug?
- Use Codex in VS Code on macOS.
- Continue a long-running thread.
- Let Codex perform web/tool work for a while.
- The thread hangs.
- After the hang/reconnect, the UI no longer shows the latest messages, but the missing content still exists in
~/.codex/sessions/...jsonl.
What is the expected behavior?
The thread should recover cleanly after hangs/tool failures, and the UI should restore the full recent conversation instead of dropping the latest visible turns.
Additional information
- Platform: macOS
- Surface: VS Code Codex extension
- Session evidence recovered from local session file
- Related local artifacts:
~/.codex/sessions/2026/04/01/rollout-2026-04-01T10-12-51-019d47e3-494a-7ae1-b05f-622c2cc8e853.jsonl~/Library/Logs/com.openai.codex/2026/04/01/
Notes
The local session file preserved assistant/user messages that the UI no longer displayed, which strongly suggests a restore/rendering/history-sync issue after the hang.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗