Skip to content

Use thread config for TUI MCP inventory#24532

Merged
etraut-openai merged 4 commits into
mainfrom
etraut/mcp-status-thread-config
May 26, 2026
Merged

Use thread config for TUI MCP inventory#24532
etraut-openai merged 4 commits into
mainfrom
etraut/mcp-status-thread-config

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented May 26, 2026

Summary

/mcp in the TUI should reflect the current loaded thread, including project-local MCP servers from that thread config. Before this change, mcpServerStatus/list only read the latest global MCP config, so the active chat could miss project-local servers.

This adds optional threadId to mcpServerStatus/list. When present, app-server resolves the loaded thread and lists MCP status from the refreshed effective config for that thread; when omitted, existing global config behavior stays unchanged.

The TUI now sends the active chat thread id for /mcp and /mcp verbose, carries that origin through the async inventory result, and ignores stale completions if the user has switched threads before the fetch returns. The app-server schemas were regenerated.

Follow-up

Once this app-server API change lands, the desktop app should make the same threadId plumbing so its MCP inventory also uses the current thread config.

Fixes #23874

Copy link
Copy Markdown
Contributor

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

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: 79f0e32ed7

ℹ️ 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/app/background_requests.rs Outdated
Copy link
Copy Markdown
Contributor

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

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: f87a5c5fb5

ℹ️ 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.rs
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

Smoke tested both /mcp and /mcp verbose. Code looks good! 👍

@etraut-openai etraut-openai merged commit 0f91e86 into main May 26, 2026
46 of 47 checks passed
@etraut-openai etraut-openai deleted the etraut/mcp-status-thread-config branch May 26, 2026 14:44
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI+App: /mcp does not show project-scoped mcp servers

2 participants