Allow review while MCP startup runs in the background#30509
Allow review while MCP startup runs in the background#30509charliemarsh-oai wants to merge 23 commits into
Conversation
0144483 to
d08d54f
Compare
d08d54f to
65462b1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65462b1b22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bbbad1bca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
The TUI currently represents foreground work and MCP initialization with one running-task state. That keeps ordinary input gated while servers start, but it also makes background MCP startup indistinguishable from an active turn and prevents
/reviewfrom opening or submitting.This PR introduces
TaskActivity, which tracks foreground work and MCP startup independently while preserving their aggregate busy state for existing input and status behavior. When MCP startup is the only activity,/reviewis available; an active turn, compaction, a pending user turn, or queued follow-up input continues to block it. Once review begins, MCP completion clears only the background activity and cannot finish the review task or replace its foreground status.The split state is preserved through thread snapshots, replayed reviews, and thread switches. Failed or rejected review setup restores the MCP startup display and retains the original draft, including attachments and text elements. Startup lag recovery and late notifications are also kept from reopening a completed round or stealing status ownership from an active review.
Stack
This is PR 2 of 2 and provides the TUI entry point for the core behavior in #30500. On its own, this PR only changes when the TUI can launch
/reviewand how it tracks the overlapping activities; it relies on #30500 to ensure that the newly launched review does not then wait for unfinished MCP startup internally.In short, #30500 makes an already-launched review safe to run without unfinished MCP, while this PR lets the TUI launch that review during MCP startup.