VS Code extension drops turn-scoped items and recent chat history during active thread

Open
#35,304 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
rust, vscode
Domain
devtools

Research direction

Start by tracing the components named in the logs: CodexMcpConnection, codex_app_server_protocol::protocol::thread_history, the analytics reducer, and IpcClient. Compare how turn state and thread-read-state-changed broadcasts are handled when tool items arrive late; done means active threads retain and render all conversation and tool items, recovering missing turn state instead of dropping them.

Written by the indexing model from the issue text.

Description

app-server bug extension session
What version of the IDE extension are you using?

v26.721.30844

What subscription do you have?

ChatGPT Business

Which IDE are you using?

Visual Studio Code

What platform is your computer?

Darwin 25.5.0 arm64 arm (macOS 26.5)

What issue are you seeing?

Summary

While using a long-running active Codex thread in the VS Code extension, recent conversation/tool items disappeared from the visible chat history. This happened during the active session, not only after a VS Code restart.

The issue appears to be a mismatch between the extension UI, the Codex app-server connection, and turn state. Tool-related items arrive after the client has lost the associated turn state, so they are dropped.

Relevant logs

Local timestamps, with thread and item identifiers redacted:

2026-07-25 08:38:05.527 [warning] [CodexMcpConnection] cli:
dropping turn-scoped item for unknown turn id `<redacted>`
item_id="exec-<redacted>"

2026-07-25 08:38:05.528 [error] [CodexMcpConnection] cli:
codex_app_server_protocol::protocol::thread_history:
dropping turn-scoped item for unknown turn id `<redacted>`

codex_analytics::reducer:
dropping turn tool count update: missing turn state
thread_id=<redacted> turn_id=<redacted> item_id="exec-<redacted>"

2026-07-25 08:38:05.534 [error]
Item not found in turn state itemId=exec-<redacted>

2026-07-25 08:39:27.102 [warning] [IpcClient]
Received broadcast but no handler is configured
method=thread-read-state-changed

### What steps can reproduce the bug?

Open VS Code with the Codex extension signed in.
Work in a long-running thread with tool calls and multiple turns.
Continue working for an extended period.
Observe that recent conversation or tool items can disappear from the visible thread.
Check the VS Code Extension Host output.

### What is the expected behavior?

The extension should retain and render all turns and tool results belonging to the active thread. If state recovery is needed, it should rehydrate the missing turn instead of silently dropping associated items.

### Additional information

This was observed on macOS while working in an active long-running thread with tool calls. I did not manually edit or delete Codex session/state files.

I can provide additional sanitized VS Code Extension Host logs if needed.

Related issue: #14812
Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.