Skip to content

Allow review while MCP startup runs in the background#30509

Draft
charliemarsh-oai wants to merge 23 commits into
charlie/review-without-mcp-startupfrom
charlie/review-mcp-startup-tui
Draft

Allow review while MCP startup runs in the background#30509
charliemarsh-oai wants to merge 23 commits into
charlie/review-without-mcp-startupfrom
charlie/review-mcp-startup-tui

Conversation

@charliemarsh-oai

@charliemarsh-oai charliemarsh-oai commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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 /review from 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, /review is 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 /review and 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.

@charliemarsh-oai charliemarsh-oai force-pushed the charlie/review-mcp-startup-tui branch from d08d54f to 65462b1 Compare June 29, 2026 13:39
@charliemarsh-oai charliemarsh-oai marked this pull request as ready for review June 30, 2026 00:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread codex-rs/tui/src/chatwidget/slash_dispatch.rs Outdated
Comment thread codex-rs/tui/src/chatwidget/slash_dispatch.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread codex-rs/tui/src/chatwidget/mcp_startup.rs
Comment thread codex-rs/tui/src/chatwidget/input_restore.rs
Comment thread codex-rs/tui/src/chatwidget/slash_dispatch.rs
@charliemarsh-oai charliemarsh-oai marked this pull request as draft June 30, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant