[VS Code Remote Linux] duplicate same-title history entries, blank thread after reopen, and archived thread corruption
Summary
In a VS Code Remote session on Linux, the Codex extension persisted duplicate conversation history entries with the same title, and after restarting VS Code one of the affected conversations reopened as a blank thread. The same class of corruption is also visible in archived history.
This does not appear to be only a UI-list duplication bug. I confirmed duplicate thread records in the local persisted Codex state.
This may be related to open issues around thread restore / no-handler thread broadcasts / PendingMigrationError, but this case appears more severe because duplicate thread records are written to disk and archived history is also affected.
Possibly related:
- #14812
- #13343
- #11721
Environment
- Date observed: April 24, 2026
- IDE: VS Code Remote / server-side extension host
- Platform: Linux server via Remote connection
- Extension id:
openai.chatgpt - Current extension path:
/home/ghj/.vscode-server/extensions/openai.chatgpt-26.422.21459-linux-x64 - Previous extension path also observed during the same period:
/home/ghj/.vscode-server/extensions/openai.chatgpt-26.417.40842-linux-x64 - Local Codex state dir:
/home/ghj/.codex
What happened
I had an existing main conversation in the Codex sidebar/history.
Then the following happened:
- Two history entries with the same title appeared at the same time.
- One of them was the main conversation I had been using.
- After exiting VS Code and reopening it, that main conversation opened as blank.
- The same general problem is also visible in archived history.
Confirmed persisted-state evidence
Duplicate threads exist in the persisted index and SQLite state
I found duplicate titles with different thread ids in both:
~/.codex/session_index.jsonl~/.codex/state_5.sqlite(threadstable)
Examples:
查看当前文件夹019dbd5d-bc1c-7372-8a89-f080377714b5019dbd5e-3dfe-77a2-9433-641d9db26c37部署 PyTorch 教程项目019dba08-5438-7952-a413-10d82310f4cd019dba09-367d-7750-ab79-0d19bdfafa09019dba09-367d-7750-ab79-0d23cc726822
So this is not just a list-rendering duplication. Duplicate thread records were persisted locally.
Corrupted thread titles
Some thread titles were polluted with tool/protocol fragments, for example strings like:
'} to=final ...}]
This suggests thread-title extraction or replay/reindex logic is consuming malformed serialized content.
Duplicate threads point to distinct rollout files
For the duplicate 查看当前文件夹 entries, the two thread records point to different rollout files:
/home/ghj/.codex/sessions/2026/04/24/rollout-2026-04-24T10-42-10-019dbd5d-bc1c-7372-8a89-f080377714b5.jsonl/home/ghj/.codex/sessions/2026/04/24/rollout-2026-04-24T10-42-43-019dbd5e-3dfe-77a2-9433-641d9db26c37.jsonl
Both files contain real session streams, so the same user intent appears to have been materialized into more than one conversation record.
Archived history is also affected
Archived duplicate rollout files exist for the same user prompt under ~/.codex/archived_sessions, including multiple archived threads with the same title.
Relevant logs and timing
During the same period, I found the following signals:
1. Extension activation / migration failures
In VS Code remote extension host logs on April 24, 2026, I repeatedly saw:
PendingMigrationError: navigator is now a global in nodejs
This affected both:
openai.chatgpt-26.417.40842-linux-x64openai.chatgpt-26.422.21459-linux-x64
2. Transport overload
In both Codex local logs and the extension logs, I repeatedly saw:
dropping overload response for connection ConnectionId(0): outbound queue is full
3. Missing IPC handlers for thread state broadcasts
I repeatedly saw warnings like:
Received broadcast but no handler is configured method=thread-stream-state-changedReceived broadcast but no handler is configured method=thread-read-state-changed
4. Local backup created during the affected period
A backup directory also appeared locally during the same period:
~/.codex.backup.20260424-105549
That timestamp lines up with the window where the repeated thread-state warnings and restore anomalies were happening.
Working hypothesis
This looks like more than a simple frontend history-list issue.
A plausible failure chain is:
- extension activation/migration fails intermittently
- extension host / Codex app-server state gets out of sync
- thread-state broadcasts arrive while handlers are missing
- transport overload starts dropping responses
- session restore/replay or recovery persists duplicate thread records
- title extraction or reindexing consumes malformed event content
- on reopen, one affected thread cannot hydrate correctly and appears blank
Expected behavior
- A conversation should have exactly one persisted thread record unless the user explicitly creates a new conversation.
- Reopening VS Code should not produce duplicate same-title history entries.
- Existing threads should reopen with their content instead of rendering as blank.
- Archived history should not accumulate duplicate/corrupted thread records.
- Thread titles should never contain protocol/tool serialization fragments.
Additional notes
I preserved the local evidence and did not clear ~/.codex after the failure.
If useful, I can provide a sanitized support bundle containing:
session_index.jsonlstate_5.sqlitelogs_2.sqlite- relevant
remoteexthost.log - relevant
openai.chatgpt/Codex.log - the affected rollout JSONL files
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I reviewed recent related reports in
openai/codexon April 24, 2026 and wanted to summarize where this issue seems to overlap with existing bugs vs where it appears to add new evidence.Short take
I did not find an older report that clearly matches the full combination seen here:
session_index.jsonlandstate_5.sqlite)So I do not think this is just a duplicate of one earlier issue.
Most relevant related issues
1. History/restore failure after restart
VS Code extension loses thread history after restart on Linux even though auth session is restoredThis is the closest match on the restart/rehydration path.
Strong overlap:
Received broadcast but no handler is configured method=thread-stream-state-changedItem not found in turn stateDifference:
2. Blank/stuck when opening prior history
Unable to open past conversation history in VS Code extensionStrong overlap:
Difference:
3. Thread-state broadcast / handler mismatch
[VS Code extension][Windows 11] Streaming UI stalls/no token-by-token updates; repeated thread-stream-state-changed broadcasts with no handlerStrong overlap:
thread-stream-state-changedno-handler warningsWhy it matters here:
4. Remote/WSL runtime failure with missing thread/rollout mapping
Cannot create new local conversation (WSL)Strong overlap:
PendingMigrationError: navigator is now a global in nodejsWhy it matters here:
PendingMigrationErroris not harmless noise in remote scenarios; it may be part of a larger failure chain that can affect thread/session integrity5. Remote SSH crash with
PendingMigrationErrorVSCodium + RemoteExplorer + Codex via ssh - Codex crashStrong overlap:
PendingMigrationErrorevidenceWhy it matters here:
6. Session metadata/title integrity issues
Increase cap of sessions in VS Code extensionThis one is not the same bug, but it is highly relevant.
Why it matters:
state_5.sqliteeven when disk/session index still had a usable thread nameWhy that matters here:
7. Error/log storm / renderer instability
VS Code Codex extension log/error loop precedes renderer crashesNot the same symptom, but relevant background:
Why it matters here:
dropping overload response for connection ConnectionId(0): outbound queue is fullWorking synthesis
Taken together, these reports suggest a broader issue family in the VS Code extension around thread/session state integrity, especially in remote Linux / WSL / SSH-like environments:
PendingMigrationError).outbound queue is full).Why this issue still seems distinct
The earlier issues establish that:
But this issue appears to be the clearest evidence I found of a more severe end state:
That combination makes this feel like either:
If helpful, I can upload a sanitized support bundle focused specifically on:
session_index.jsonlstate_5.sqlitelogs_2.sqliteremoteexthost.logopenai.chatgpt/Codex.logRelated issues referenced above:
Update: I was able to reproduce the duplicate persisted-thread behavior again from a fresh local Codex state.
Before reconnecting VS Code Remote, I moved the previous state out of the way:
Then I reopened VS Code, reconnected to the Linux server, and started a new Codex conversation. A fresh
~/.codexdirectory was created at about2026-04-24 13:56:18 +0800.Within that fresh state,
~/.codex/session_index.jsonlalready contained duplicate same-title entries:The same duplicate title is also present in the fresh
~/.codex/state_5.sqlitethreadstable:Both ids point to separate non-empty rollout files under the new
~/.codex/sessions/2026/04/24/directory.So this is not only legacy corruption from the previous
~/.codex; duplicate persisted thread creation still reproduces after moving the old state away, reconnecting VS Code Remote, and starting a new conversation with a fresh local Codex state.I'm facing a similar problem. VS Code Remote-SSH to HPC Linux. ChatGPT login is valid: codex login status returns logged in. This is not a pure auth failure. Local Codex app-server/transport enters reproducible overload: logs show thousands of outbound queue is full, dropping overload response, server overloaded, plus thread/resume, thread-read-state, PendingMigrationError; app-server later exits with SIGTERM and extension reports disconnected / Codex process not available. CLI smoke also times out during model refresh: failed to refresh available models: timeout waiting for child process to exit. The strongest trigger appears to be old thread recovery, especially thread, with which also returning overloaded on thread/resume. Removing/renaming active ~/.codex makes the extension usable again, suggesting local state/session hydration/backpressure rather than backend unavailability.
The duplicate thread rows plus blank reopen/archived corruption make this a strong persisted-state case for
codex-rescue==0.1.0a4.If the original state is still preserved, could you run:
pipx install codex-rescue==0.1.0a4codex-rescue sessionscodex-rescue doctor --latestThe commands are read-only. They won’t rewrite the VS Code/Codex state DB, but they can surface duplicate inventory, malformed rollout records, unfinished correlations, and other durable inconsistencies without touching the originals.
A sanitized findings/count summary is enough. Please don’t post raw rollouts, SQLite DBs, extension logs, prompts, tool output, credentials, repository data, thread IDs, or private paths.