Repository navigation
feat: use MCP plugin apps across conversations and workspace files - #161747
Conversation
Extend the opt-in MCP Apps host with discovery and entrypoints, settings, rich forms, scoped file editing, multimodal context, deep links, and native Codex session preparation. Preserve existing requester, approval, runtime, and file authority owners. Co-authored-by: steipete <[email protected]>
Reuse the canonical bounded plugin approval preview without rejecting otherwise valid large App arguments. Keep the same one-shot approval and live-authority gates. Bound context-strip icons and scrolling so attachments leave the composer usable. Co-authored-by: steipete <[email protected]>
Keep App fullscreen rendering in the existing browser top layer and return to inline for same-conversation questions or approvals without replacing the iframe. Consolidate host-context, resource, and input notifications under the existing bridge lifetime. Co-authored-by: steipete <[email protected]>
Preserve main's run identity and protocol table ownership, allow bounded rich display text, and isolate App context by agent. Reject unsupported selected native harnesses instead of opening another transport. Co-authored-by: steipete <[email protected]>
Co-authored-by: steipete <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 2, 2026, 7:45 AM ET / 11:45 UTC (Revision 10). ClawSweeper reviewWhat this changesExtends the opt-in MCP Apps host with direct launch, server settings, conversation attachments, workspace file editing, rich forms, and existing native Codex connections. Merge readiness⛔ Blocked before merge - 6 items remain Keep open: this is maintainer-sponsored work that current main does not replace. One resource-metadata forwarding defect remains; earlier authority and installed-client findings are repaired. Priority: P2 Review scores
Verification
How this fits togetherMCP Apps display interactive interfaces supplied by configured tool servers. The Gateway binds their requests to conversation, requester, approval, and workspace authority before forwarding them to direct MCP transports or the conversation’s native Codex connection. flowchart TD
A[Configured MCP servers] --> B[App discovery and launch]
C[Conversation and requester] --> B
B --> D[Sandboxed App interface]
D --> E[Gateway authority and approval checks]
E --> F[Direct or native MCP connection]
E --> G[Scoped workspace files]
F --> H[App results and conversation context]
G --> H
Before merge
Findings
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve the existing transport and authority owners while carrying resource metadata end to end and confirming consistent question answers across native and channel clients. Do we have a high-confidence way to reproduce the issue? Yes, for the identified patch defect: an App resource read with nonempty _meta reaches the RPC but loses that metadata before runtime dispatch. This is source-proven on the pinned PR head; no code was executed. Is this the best way to solve the issue? The existing-owner approach fits the sponsored feature, but the implementation is incomplete: forwarding resource metadata through the common operation owner is the narrow repair. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ca7b5d41b338. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
Resolve the actual Apps-page conflict while retaining main subscription ownership and existing plugin App state. Co-authored-by: steipete <[email protected]>
Preserve the upstream optional ifMatch contract and document unconditional-save semantics explicitly. Co-authored-by: steipete <[email protected]>
|
Review disposition for the updated candidate:
Product build and selected isolated direct/native acceptance are complete; the PR is ready for review, not merged. The first exact-head CI exposed type-import cycles, an unused test-only production export, and a Node database seed helper in the UI runtime tree. These ownership defects are now repaired with a complete caller cutover; Madge, the exact storage-boundary regression, focused form/native/UI tests, types, lint, and strict UI performance passed. The source-only correction received a clean independent review. Hosted CI for the replacement head remains an enforced gate; no workflow rerun or merge bypass has been requested.
Native retry final-I/O evidenceThe checked-in
The shared client remains open in every case. Upstream Codex was inspected at The native retry finding is accepted and repaired, not waived. Replacement-head CI/security/review remain enforced before merge.
|
What Problem This Solves
MCP plugin apps need to work as interactive tools across conversations and workspace files, rather than only as inline results after a model tool call.
User Impact
With the existing opt-in MCP Apps host enabled, users can open advertised apps directly, change server-owned settings, attach app resources and text/image context, use file viewers/editors with conflict-aware saves, and answer rich forms. Setup skills run only when explicitly requested.
This does not enable apps by default, install native Codex plugins, grant access to ChatGPT accounts, or introduce another runtime. Existing session, requester, tool-approval and workspace boundaries remain in force. App-supplied context remains untrusted conversation data.
File saves follow the upstream optional precondition:
ifMatchprevents stale overwrites; omitting it writes without a version check. Apps should send the read ETag when protecting concurrent edits. Neither form grants access beyond the opened writable file.Native Codex Apps keep the existing conversation-owned connection and approval policy. Interactive forms work with prompting modes such as Guarded/Workspace; Codex can decline them under its
neverpolicy in Full access. Native calls to one server/conversation cannot overlap, and background previews share the existing per-view request limits. These restrictions are documented; there is no fallback connection or policy bypass.Why This Change Was Made
The implementation extends the existing MCP sandbox and reuses the conversation, file, approval and native Codex connection owners. App instances retain their conversation identity; deep links and display-mode changes preserve the instance, and pending input remains reachable above fullscreen apps.
Requested by and co-authored with @steipete.
Work sessions
Evidence
Native retry final-I/O evidence
The checked-in
native-mcp-app.authority.test.tsexercises the production adapter and production Codex client with the existing in-memory transport. The wire supplies-32001before enqueue, then changes authority during backoff without aborting the signal. Counts below are observed transport writes, including the initial rejected request. This is deterministic boundary proof, not a claim that the live native server was overloaded; separate real-server acceptance is described above. No credentials or user data are involved.The shared client remains open in every case. Upstream Codex was inspected at
8f73cdee456b6c46b791780d40cadf9d556d22a4; its ingress overload response rejects before queue admission.bwrap --die-with-parentwhen its spawning thread exited, even with the parent process alive. A stable proof supervisor preserves the same sandbox flags; the control reproducer and a real native settings round-trip after 15s idle passed. Initial Full-access native form attempts were declined by upstream policy; a later guarded attempt overlapped a background call and was rejected. Swift/macOS execution is unverified on this Linux host. Earlier browser-conformance container compilation was killed before assertions, not counted as a pass. Android canonical-answer coverage passed (39 tests).Before/after images below show the same live reference app moving from an inline tool result to a conversation-side app with removable context.
Before
After
Maintainer landing notes (October 2026)
QuestionManager.validateAnswersnow resolves every submitted string to one canonical answer: an exactoption.valuematch wins; otherwise a label match (exact for form/secret questions, trim-insensitive otherwise) that identifies exactly one option resolves to that option'svalue ?? label; anything else stays free text and is accepted only forisOtherquestions. Label-sending and value-sending clients converge on the same stored answer with no capability negotiation. The regression tests fail on the pre-fix code.mcp.app.writeResourcekeeps the upstream extension contract whereifMatchis optional. An omittedifMatchis a last-writer-wins save, limited to the file the same view already opened writable, under the same session and requester authority. Apps that protect concurrent edits send the read ETag, as the docs state. No force-save or broader file grant exists.main. Main now generates the Kotlin and Swift protocol models from the schema at build time (build(apps): generate native protocol models at build time #162251), so this PR's hand-written model edits were dropped; the generated models carryQuestionOption.value, the form fields and themcp.app.*methods (pnpm protocol:checkpasses for both). Conflicts with main's Gateway and UI refactors were resolved on main's owners; the moved cleanup export and the retired sync workspace-root helper (removed in fix: recover workspace icons without repeated unavailable requests #162885 with its last consumer) were re-homed at their owners; the agent-runner MCP context projection moved to a sibling module for the line-cap ratchet with identical logic.register*Englishpattern) brings the landing head to 373,137 B, under the unchanged 373,454 B limit. No baseline change. The link probe only intercepts the/<plugin>/app/<tool>shape, so ordinary ChatGPT plugin pages keep default navigation.mcp.app.subscribeResourcewatched the file's directory, and FSEvents directory watches drop events under load on macOS (the same failure fix(test): checkout fixture loses its report on loaded macOS hosts #162487 fixed in the checkout fixture; reproduced on the landing host: 0 directory events, 1 file event). Subscriptions now watch the file itself (kqueue) and re-arm on atomic replacement..oxfmtrc.jsoncignoredapps/unanchored, which also excludedui/src/pages/apps/; it is now root-anchored and the four affected files are formatted. Rootapps/stays excluded.