Codex mobile can open the same VS Code thread as a concurrent assistant/tool lineage while a turn is active

Open 💬 1 comment Opened Jul 4, 2026 by joelfarthing

What version of the IDE extension are you using?

openai.chatgpt-26.5623.101652-linux-x64

What subscription do you have?

Chat GPT Pro 5x

Which IDE are you using?

VS Code over SSH

What platform is your computer?

Linux 6.17.0-35-generic x86_64 x86_64

What issue are you seeing?

I reproduced a Codex session divergence between the VS Code Codex extension over SSH and the iPhone app. The phone showed the same thread id as the VS Code session, but after I sent a message from the phone, the conversation continued as two visible assistant/tool lineages inside the same thread and same rollout file.

The ticker process itself stayed clean. There was one process, one writer label, monotonic sequence numbers, and no second writer. The divergence was in the Codex session/tool state, not in the test process.

The rollout contains two concurrent turn lineages:

  • VS Code-side turn id: 019f2dc2-3a7a-7093-9135-02088e248dfc.
  • iPhone-side turn id: 019f2dc4-588a-7691-bfdd-46429f28e6e9.

After the iPhone message, the iPhone-side lineage tried to poll the original foreground tool session and got:

write_stdin failed: Unknown process id 99733

The underlying ticker process was still alive at that point. The VS Code-side lineage later continued polling session id 99733 and received tick output. The iPhone-side lineage then started a separate monitor with tail -n 0 -F /tmp/codex-remote-repro/ticks.jsonl.

Both visible assistant lineages operated against the same workspace and same test-run state. Both attempted to inspect or stop the same run.

What steps can reproduce the bug?

Feedback ID: 019f2dc0-21fc-7412-99f9-7a01dcf7efd5

What is the expected behavior?

The phone should either attach to the active turn coherently or refuse/queue input until the active turn can accept it safely.

There should be one visible assistant lineage for the thread.

Tool-session ownership should stay coherent. If a foreground tool session exists in the active turn, both clients should agree on whether it can be polled, stopped, or observed.

Additional information

Feedback ID: 019f2dc0-21fc-7412-99f9-7a01dcf7efd5

Codex CLI: codex-cli 0.142.5.

Local rollout: ~/.codex/sessions/2026/07/04/rollout-2026-07-04T10-29-54-019f2dc0-21fc-7412-99f9-7a01dcf7efd5.jsonl.

Ticker evidence:

{"utc":"2026-07-04T15:32:27Z","local":"2026-07-04T10:32:27-0500","seq":0,"writer":"vscode-main","thread_id":"019f2dc0-21fc-7412-99f9-7a01dcf7efd5","turn_marker":"A","phone_marker":"","pid":84699,"ppid":78010,"git_admin":""}
{"utc":"2026-07-04T15:33:27Z","local":"2026-07-04T10:33:27-0500","seq":1,"writer":"vscode-main","thread_id":"019f2dc0-21fc-7412-99f9-7a01dcf7efd5","turn_marker":"A","phone_marker":"","pid":84699,"ppid":78010,"git_admin":""}
{"utc":"2026-07-04T15:34:27Z","local":"2026-07-04T10:34:27-0500","seq":2,"writer":"vscode-main","thread_id":"019f2dc0-21fc-7412-99f9-7a01dcf7efd5","turn_marker":"A","phone_marker":"","pid":84699,"ppid":78010,"git_admin":""}
{"utc":"2026-07-04T15:35:27Z","local":"2026-07-04T10:35:27-0500","seq":3,"writer":"vscode-main","thread_id":"019f2dc0-21fc-7412-99f9-7a01dcf7efd5","turn_marker":"A","phone_marker":"","pid":84699,"ppid":78010,"git_admin":""}
{"utc":"2026-07-04T15:36:27Z","event":"repro_exit","reason":"stop_file","writer":"vscode-main","thread_id":"019f2dc0-21fc-7412-99f9-7a01dcf7efd5","turn_marker":"A","pid":84699,"ticks":4}

The state DB did not show a duplicate local thread row or duplicate recent title. codex doctor reported healthy state databases, agreement between rollout files and the state DB thread inventory, zero duplicate rollout thread ids, zero duplicate DB paths, app-server running, and websocket connectivity OK. The doctor command exited nonzero because TERM=dumb is reported as a terminal failure and there were optional MCP configuration warnings.

I have screenshots showing the split from the user-visible side:

  • iPhone view: same thread id confirmed, then an iPhone-visible assistant response says the foreground tool handle disappeared after the mobile interruption.
  • VS Code view at the same period: the original assistant lineage is still watching the ticker and says it is continuing to watch for the phone steering event.

<img width="603" height="1311" alt="Image" src="https://github.com/user-attachments/assets/06ba7ef9-c401-4dfa-88ad-54bb811dee97" />

<img width="375" height="630" alt="Image" src="https://github.com/user-attachments/assets/f7689c7f-7ddc-4078-9f32-192e5ae28c29" />

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗