Skip to content

fix(mcp): return CONFIRMATION_REQUIRED as a usual result on the Claude profile - #1779

Merged
realcodesiman merged 1 commit into
mainfrom
fix/mcp-claude-confirmation-result
Nov 25, 2026
Merged

realcodesiman merged 1 commit into
mainfrom
fix/mcp-claude-confirmation-result

Conversation

@realcodesiman

Copy link
Copy Markdown
Contributor

Summary

On the Claude profile (/mcp/claude), CONFIRMATION_REQUIRED was returned with isError: true. A pending approval is not a failure, and clients can treat an error result as a broken call instead of showing the approval to the user.

  • executeTool gets an optional ExecuteToolOptions.confirmationAsResult. When it is set, the HITL gate's CONFIRMATION_REQUIRED payload is returned as a usual JSON result.
  • The Claude profile passes confirmationAsResult: true. This matches the OpenAI profile (src/profiles/openai.ts).
  • The default profile (/mcp/messages) is unchanged: it still returns isError: true, and a new assertion locks that in.

Test plan

  • New unit test: executeTool with confirmationAsResult returns no error flag and sends no request
  • Existing default-profile test now asserts isError: true
  • Claude transport test: the write call response contains CONFIRMATION_REQUIRED and no "isError": true
  • vitest run: 341 passed; tsc --noEmit clean; biome clean
  • After deploy: call one write tool on /mcp/claude and check that it returns a usual result

🤖 Generated with Claude Code

…e profile

A pending approval is not a tool failure. The Claude profile now passes
confirmationAsResult to executeTool, so CONFIRMATION_REQUIRED comes back
without isError: true, matching the OpenAI profile. The default profile
keeps reporting it as an error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the bug Something isn't working as expected label Nov 25, 2026
@realcodesiman
realcodesiman merged commit 92fe692 into main Nov 25, 2026
15 checks passed
@realcodesiman
realcodesiman deleted the fix/mcp-claude-confirmation-result branch November 25, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant