Skip to content

Support plugin install entry metadata in TUI#28798

Open
zswang-oai wants to merge 1 commit into
mainfrom
nm-codex/install-plugins-multiple-prompt
Open

Support plugin install entry metadata in TUI#28798
zswang-oai wants to merge 1 commit into
mainfrom
nm-codex/install-plugins-multiple-prompt

Conversation

@zswang-oai

@zswang-oai zswang-oai commented Jun 17, 2026

Copy link
Copy Markdown

Why

The install picker needs per-entry metadata so desktop clients can render each candidate with its own Install button while preserving the existing Skip / Continue flow.

What changed

  • parse nested entries and categories metadata in the TUI elicitation path
  • preserve the install suggestion reason for the single-entry TUI presentation
  • leave the existing fallback metadata shape intact

Stack

This is PR 1 of 7.

Paired Codex Apps PR: https://github.com/openai/openai/pull/1019331

@zswang-oai zswang-oai requested a review from a team as a code owner June 17, 2026 22:16
@zswang-oai zswang-oai force-pushed the nm-codex/install-plugins-multiple-prompt branch from 70df46b to bf33de5 Compare June 17, 2026 22:16

@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: bf33de56ce

ℹ️ 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 on lines +431 to +433
DiscoverableTool::Plugin(plugin) => {
if is_remote_plugin_install_suggestion(&plugin.id) {
false

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.

P2 Badge Preserve remote plugin completion for legacy clients

When a remote plugin suggestion is accepted by an app-server client that doesn't include the new installed_entries content (older clients and the auto-accept path still resolve elicitations with empty content), this branch makes the only local verification path false; without an app-reported entry, the tool returns completed:false even though remote plugin installs were previously treated as completed because core cannot verify them locally. Keep the legacy success fallback when no picker acknowledgement is present, or this breaks existing app-server clients that accept the elicitation without the new response payload.

AGENTS.md reference: AGENTS.md:L103-L110

Useful? React with 👍 / 👎.

Comment on lines +179 to +184
RequestPluginInstallsMeta {
codex_approval_kind: REQUEST_PLUGIN_INSTALL_APPROVAL_KIND_VALUE,
persist: Some(REQUEST_PLUGIN_INSTALL_PERSIST_ALWAYS_VALUE),
suggest_type: args.action_type,
entries,
categories,

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.

P1 Badge Preserve legacy tool-suggestion metadata

For single-entry install prompts sent through mcpServer/elicitation/request, this now emits only nested entries/categories metadata and drops the legacy top-level tool_type, tool_id, tool_name, suggest_reason, and install_url shape that app-server clients already parse to render tool suggestions; the TUI parser was updated in this commit, but other app-server clients receive _meta as opaque JsonValue and will no longer recognize these install prompts. Keep the legacy top-level fields for one-entry requests (or version the metadata) while adding the new picker shape.

AGENTS.md reference: AGENTS.md:L103-L110

Useful? React with 👍 / 👎.

Comment thread codex-rs/core/src/session/mcp.rs Outdated
Comment on lines +635 to +638
.get("entries")
.and_then(Value::as_array)
.and_then(|entries| entries.first())
.and_then(Value::as_object)

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.

P2 Badge Record every picker entry in sent telemetry

When a picker request contains multiple flat entries or multiple categorized entries, this telemetry helper only extracts the first entry, so codex.plugin_install_elicitation_sent is emitted for just one suggested integration even though the handler records suggestion outcomes for every entry. Multi-install experiments will have skewed sent/conversion denominators for every entry after the first; iterate all picker entries or remove the per-tool dimensions for multi-entry elicitations.

Useful? React with 👍 / 👎.

@zswang-oai zswang-oai force-pushed the nm-codex/install-plugins-multiple-prompt branch from bf33de5 to 08604af Compare June 17, 2026 22:41
@zswang-oai zswang-oai changed the title Support multi-tool install requests Support plugin install entry metadata in TUI Jun 17, 2026
@zswang-oai zswang-oai changed the title Support plugin install entry metadata in TUI Support plural plugin install requests Jun 17, 2026
@zswang-oai zswang-oai force-pushed the nm-codex/install-plugins-multiple-prompt branch from bf2b1a7 to 08604af Compare June 18, 2026 00:04
@zswang-oai zswang-oai changed the title Support plural plugin install requests Support plugin install entry metadata in TUI Jun 18, 2026
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.

2 participants