Skip to content

agent: Check is_error flag in MCP tool responses#47095

Merged
benbrandt merged 3 commits intozed-industries:mainfrom
cppcoffee:agent
Feb 12, 2026
Merged

agent: Check is_error flag in MCP tool responses#47095
benbrandt merged 3 commits intozed-industries:mainfrom
cppcoffee:agent

Conversation

@cppcoffee
Copy link
Contributor

Previously, when an MCP server returned a tool response with
is_error: true, the error content was incorrectly treated as
a successful result. This could mislead the LLM into thinking
the tool call succeeded when it actually failed.

Now we check the is_error flag and propagate the error message
properly, allowing the agent to handle failures appropriately.

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 18, 2026
@SomeoneToIgnore SomeoneToIgnore added the area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Jan 18, 2026
@benbrandt benbrandt enabled auto-merge (squash) February 12, 2026 13:06
Copy link
Member

@benbrandt benbrandt left a comment

Choose a reason for hiding this comment

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

Thanks!

@benbrandt benbrandt self-assigned this Feb 12, 2026
cppcoffee and others added 2 commits February 12, 2026 21:35
Return an error when MCP tool response has is_error=true instead of
treating error content as success.
auto-merge was automatically disabled February 12, 2026 13:35

Head branch was pushed to by a user without write access

@benbrandt benbrandt enabled auto-merge (squash) February 12, 2026 13:39
@benbrandt benbrandt merged commit 521ffc3 into zed-industries:main Feb 12, 2026
27 checks passed
@cppcoffee cppcoffee deleted the agent branch February 12, 2026 13:51
morgankrey added a commit that referenced this pull request Feb 19, 2026
Auto-applied queued documentation suggestions from:
- PR #48908
- PR #48909
- PR #48910
- PR #48912
- PR #48930
- PR #44794
- PR #48763
- PR #45073
- PR #48495
- PR #49374
- PR #49139
- PR #48780
- PR #48619
- PR #48978
- PR #48962
- PR #48988
- PR #47860
- PR #49015
- PR #47095
- PR #47475
- PR #48542
- PR #46766
- PR #47754
- PR #48807
- PR #44506
- PR #49051
- PR #49069
- PR #48842
- PR #48851
- PR #48736
- PR #47673
- PR #49094
- PR #49098
- PR #49622

Generated with script/docs-suggest-publish for human review in draft PR.
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied queued documentation suggestions from:
- PR #48908
- PR #48909
- PR #48910
- PR #48912
- PR #48930
- PR #44794
- PR #48763
- PR #45073
- PR #48495
- PR #49374
- PR #49139
- PR #48780
- PR #48619
- PR #48978
- PR #48962
- PR #48988
- PR #47860
- PR #49015
- PR #47095
- PR #47475
- PR #48542
- PR #46766
- PR #47754
- PR #48807
- PR #44506
- PR #49051
- PR #49069
- PR #48842
- PR #48851
- PR #48736
- PR #47673
- PR #49094
- PR #49098
- PR #49622
- PR #49554
- PR #49710
- PR #49716
- PR #49732
- PR #49788
- PR #49876
- PR #49902
- PR #49910
- PR #49390
- PR #50027

Generated with script/docs-suggest-publish for human review in draft PR.
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied documentation from:
- PR #48619: agent single_file_review default change
- PR #48978: enriched symbol names in outline
- PR #49015: audio device selection for collab
- PR #47095: MCP error handling
- PR #47475: OpenRouter default model requirement

Skipped (already documented):
- PR #49139, PR #48780, PR #48988, PR #47860
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied queued documentation suggestions from:
- PR #48908
- PR #48909
- PR #48910
- PR #48912
- PR #48930
- PR #44794
- PR #48763
- PR #45073
- PR #48495
- PR #49374
- PR #49139
- PR #48780
- PR #48619
- PR #48978
- PR #48962
- PR #48988
- PR #47860
- PR #49015
- PR #47095
- PR #47475
- PR #48542
- PR #46766
- PR #47754
- PR #48807
- PR #44506
- PR #49051
- PR #49069
- PR #48842
- PR #48851
- PR #48736
- PR #47673
- PR #49094
- PR #49098
- PR #49622
- PR #49554
- PR #49710
- PR #49716
- PR #49732
- PR #49788
- PR #49876
- PR #49902
- PR #49910
- PR #49390
- PR #50027

Generated with script/docs-suggest-publish for human review in draft PR.
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied documentation from:
- PR #48619: agent single_file_review default change
- PR #48978: enriched symbol names in outline
- PR #49015: audio device selection for collab
- PR #47095: MCP error handling
- PR #47475: OpenRouter default model requirement

Skipped (already documented):
- PR #49139, PR #48780, PR #48988, PR #47860
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants