TUI still shows “Implement this plan?” after implementation starts from another client
What version of Codex CLI is running?
0.147.0
What subscription do you have?
Pro
Which model were you using?
_No response_
What platform is your computer?
_No response_
What terminal emulator and version are you using (if applicable)?
_No response_
Codex doctor report
What issue are you seeing?
I run Codex through app-server and connect the CLI with codex --remote.
The TUI shows “Implement this plan?”. I then start the implementation from another app-server client connected to the same thread.
The implementation starts normally, but the remote TUI still shows the old plan prompt.
What steps can reproduce the bug?
This setup uses one app-server process with two clients:
- Client A: Codex CLI TUI connected with
codex --remote - Client B: Agent Relay, connected through the app-server protocol
Both clients operate on the same thread.
- Start one app-server: codex app-server --listen ws://127.0.0.1:4500
- Connect Client A to it: codex --remote ws://127.0.0.1:4500
- Connect Client B to the same WebSocket endpoint. Do not start a second app-server.
- Start or resume a thread in Client A, then have Client B resume the same "threadId". Both clients are now subscribed to the same thread.
- Enter Plan mode and complete a plan. Client A shows the “Implement this plan?” prompt.
- In Client B, select "Implement" for that same thread. Client B switches the thread out of Plan mode and starts the implementation turn through the shared app-server.
- The implementation starts successfully and Client A receives "thread/settings/updated" and "turn/started".
- Check Client A.
Actual behavior
Client A still shows the old “Implement this plan?” prompt, even though Client B has already started implementation on the same thread.
Expected behavior
The remote TUI should dismiss the prompt when another client changes the shared thread out of Plan mode or starts a new turn.
What is the expected behavior?
_No response_
Additional information
I’m building an integration that lets users continue the same Codex session from either the CLI or an IM client.
A single app-server owns the session, while the CLI TUI and IM client connect to the same thread. Messages, streamed output, approvals, user-input requests, and Plan decisions should be available from either client.
The integration does not run the same action twice. Once an action is handled by one client, the other connected clients should reflect the updated thread state. This issue breaks that handoff: implementation starts from the IM client, but the TUI keeps showing the stale Plan prompt.
1 Comment
Confirmed by inspection on
main@ 1f41cc5d92: the "Implement this plan?" prompt is a purely local TUI selection view, opened at turn-complete (chatwidget/turn_runtime.rs#L227-L265), and nothing ever dismisses it in response to thread events. When another client starts the implementation, your TUI receives the shared thread's turn-started/mode-change events, but no handler closes the plan selection view — it only goes away via local selection or local modal churn.This is worse than cosmetic: the stale prompt's actions still fire against the thread, so selecting "implement" after client B already started risks a duplicate turn/mode change on the now-advanced thread.
Fix shape: when a turn starts (or the collaboration mode changes) on the active thread and this client didn't initiate it, dismiss the plan selection view if it's showing — the bottom pane already tracks the active view, and the external-event plumbing exists (the same events update the transcript). A multi-client test — client A gets the prompt, client B starts the turn, assert A's prompt closes — would pin it.