feat(mcp): support thread attachments - #8700
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
Thread transfer impact
This comment will update automatically after the next completed run. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a substantial production MCP attachment workflow spanning upload authorization, filesystem claims, orchestration retries, contracts, and provider adapters. An unresolved provider-delivery concern and newly added static-analysis suppression directives make human review necessary. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
490318a to
373612e
Compare
There was a problem hiding this comment.
UI consistency review
One concrete regression found: the shared markdown renderer now resolves its environment-scoped actions from the globally active environment instead of explicit scope.
Everything else in the changed web UI (panel/toolbar displayMode variants, ThreadDetailsPanel shared style constants, PopoverPopup positioner props) stays within the shared primitive contracts, and no apps/web/src CSS changed in this PR.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Reviewed the new/changed Effect service code in this PR (AttachmentMcpService, the attachment toolkit, OrchestratorMcpService, ThreadManagementService, Orchestrator). One convention deviation found; everything else (namespace imports, inline Context.Service interface, environment-based dependency acquisition, structured Schema.TaggedErrorClass failures with derived messages and preserved cause) matches the conventions.
Posted via Macroscope — Effect Service Conventions
fae898d to
46e474c
Compare
There was a problem hiding this comment.
Effect service conventions review: one import-convention deviation in the new MCP attachment test. Everything else (new AttachmentMcpService tag/make/layer shape, environment-based dependency acquisition, and the new ThreadManagementPostDispatchProjectionError structural error with derived message and preserved cause) matches the repository conventions.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
Effect service conventions review: one finding on the new OrchestratorV2Shape.getCommandReceipt signature.
Posted via Macroscope — Effect Service Conventions
c01ff20 to
9d2539a
Compare
bfc31cd to
f1d2112
Compare
There was a problem hiding this comment.
Effect service conventions review: one finding on the new transformEventSink type signatures in the replay harness.
Posted via Macroscope — Effect Service Conventions
a6e0049 to
50a57b6
Compare
b82facd to
2ac9bfe
Compare
31682e6 to
da38dd1
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON, but a cloud agent failed to start.
Reviewed by Cursor Bugbot for commit da38dd1. Configure here.
da38dd1 to
6991ca7
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
Superseded as the active MCP proposal by #10564 in the rebuilt MCP stack, following the maintainer request to review thin service wrappers separately from service hardening. This is not a full feature-parity replacement. t3_thread_send remains unchanged. The new t3_thread_send_attachments checks target ownership and permission ceilings. Each call is a new message; claimed files are retained when dispatch outcome is uncertain. Provider support stays in adapters, and no keyed replay protocol is added. Closing this mixed proposal without merging. The remote branch |

Problem
MCP thread creation and send paths discarded attachments even though V2 already supports thread-scoped attachment claims.
Change
Behavior
Uploads use the existing POST route and bearer URL. New operations validate ownership, MIME support, and provider capability before creating a thread. Accepted retries return the original message and run identity after the pending upload disappears, while unused replay copies are cleaned up. OpenCode keeps path fallback behavior and Antigravity accepts image attachments only.
Validation
@t3tools/contracts,@t3tools/shared, andt3typechecks.Base
Standalone PR on
t3code/codex-turn-mappingat415ed0f73b97f1655b6282492f81d0b2bba3a9cc.Implemented by GPT-5.6-Sol via Codex in T3 Code.