fix(server): classify successful MCP results correctly - #8030
fix(server): classify successful MCP results correctly#8030SamarthaB10 wants to merge 2 commits into
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:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 14fa517. Configure here.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrow server-side status-classification fix with targeted tests. It only changes affected MCP activity rows from misleading failure states to completed states while preserving genuine failures and declined outcomes. You can add or adjust custom eligibility rules. Learn more. |
|
Addressed the Cursor Bugbot finding in commit The adapter correctly classified the MCP call, but Added a regression test covering the final projected payload status. |

What Changed
failed.inspectTaskChangesreturning a result with an incorrect failed status.Why
Codex can report an MCP tool call with
status: "failed"while also returning a valid result and no error. T3 Code displayed these calls as failed even though the agent received and used the result. This change uses the result and error fields to classify the call correctly.UI Changes
Not applicable. This is a server/provider lifecycle classification fix. The visible effect is limited to the activity status shown for affected tool calls.
Checklist
Verification
git diff --checkpassed.vpis not installed and workspace dependencies are not present.Note
Low Risk
Narrow status-classification fix for MCP tool-call lifecycle events; genuine failed/declined items are unchanged.
Overview
Treats Codex MCP tool calls as completed when they have a non-null
resultand noerror, even if Codex reportsstatus: "failed". Genuine failed and declined items are unchanged.CodexAdapternow usesitemLifecycleStatus/hasSuccessfulToolResultfor that override.projectActivityPayloadno longer copies the nested failed status onto a successful MCP result, so the UI does not flip those calls back to failed.Reviewed by Cursor Bugbot for commit da84927. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix
mcpToolCallitems with successful results being classified asfailedordeclinedmcpToolCallitem has a non-nullresultand nullerror, it is now treated as successful regardless of the item'sstatusfieldhasSuccessfulMcpResulthelper in ActivityPayloadProjection.ts to prevent downgrading top-levelcompletedstatushasSuccessfulToolResultanditemLifecycleStatushelpers in CodexAdapter.ts somapItemLifecycleemitscompletedfor successful MCP tool calls even when source status isfailedordeclinedstatusoffailed/declinedfor MCP calls that actually have results will now seecompletedinsteadMacroscope summarized da84927.