Repository navigation
Claude MCP elicitation requests are declined without an approval prompt #14878
Description
Activity
Note
Grok responding on behalf of Julius.
Triage
Thanks for the precise diagnosis, @diastidean! Confirmed: Claude declines MCP
elicitation/createbecause the adapter never handles it. This is a bug in the existing app-access approval path, not a new workflow.makeClaudeAdapterinapps/server/src/provider/Layers/ClaudeAdapter.tspassescanUseToolandonUserDialog(withsupportedDialogKinds: ["resume_return"]) intocreateQuery, but it never setsonElicitation. There's noClaudeAdapterV2; this is the adapter in question. In@anthropic-ai/claude-agent-sdk@0.3.276,onElicitationis the callback for these requests, and when it's missing and no Elicitation hook answers first, the SDK declines.onUserDialogis a different control request and never sees them. Thefull-accessauto-allow insidecanUseTooldoesn't cover them either, so the decline happens in every runtime mode. The ignoredelicitation_completesystem subtype isn't part of this path. It's also separate from the ACPelicitation/createhandling in merged #11294.Codex already shows this kind of request on the existing card:
mcpServer/elicitation/requestbecomesrequest.openedwithrequestType: "mcp_elicitation_approval", which web and mobile render asmcp-elicitation. A fix should reuse that event rather than going throughcanUseToolorAskUserQuestion.Your proposed narrow scope looks right to me, but it still needs a maintainer to confirm before you open a PR. Here's what that PR would cover:
- Handle
onElicitationon the Claude query. - Open the existing app-access card only for an approval-only form, and wait for the user. Use
request.messageas the detail, and for the app name usedisplayName, falling back totitleand thenserverName. - Return
{ action: "accept", content }only after an explicit accept. Fillcontentthe way Codex'stoMcpElicitationResponsedoes for a one-time"accept": approval choices meaning once/accept/approve/allow, plus defaults. If a required field still can't be filled, decline without opening a card. - Return decline and cancel as those actions. Never return
null, because the SDK treats it as "already answered out of band" and the elicitation would otherwise hang until timeout. - Fail closed with
declineand no card for URL-mode elicitations and for forms asking for a value this card can't collect. Don't open the URL. - One-time accept only: no
acceptForSession, noacceptAlways, and no Claude permission rules written. Web and mobile both offer a session grant whenoptionsis omitted, so the opened request needs explicit Cancel, Decline, and Approve options. - Park the wait on the session's existing pending-approval map so
respondToRequestresolves it and stopping the session cancels it. The SDK callback'srequestIdis not T3's approval id.
Focused adapter tests should cover these cases:
- An approval-only form waits and only accepts after
respondToRequest. - Decline and cancel map to those actions.
- URL forms and value forms decline without showing a card.
- Aborting before the listener attaches, and stopping while the card is open, both settle as cancel.
- A late response after the request is gone hits the existing unknown-request error and doesn't settle twice.
URL auth, a form renderer, and session or always grants would stay out of scope.
- Handle
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.via-triageFiled through npx t3 triageFiled through npx t3 triage
on Oct 2, 2026 @juliusmarminge Thanks for the triage on this. I’ve rebased #14895 and added focused test and manual verification evidence. Could you or another maintainer confirm whether the narrow, one-time Claude MCP approval scope is approved under the contribution guide? Happy to adjust or close the PR if this isn’t the desired direction.
Reproduction
In a T3 Code Claude thread, invoke an MCP tool that requests app-access approval through
elicitation/create(for example,codex-cuarequesting access to Dia).Expected: T3 shows the app-access request and waits for the user to approve or decline.
Actual: The tool immediately receives a decline; no approval card appears.
Diagnosis
ClaudeAdapterV2registersonUserDialogbut not the Claude Agent SDK's separateonElicitationcallback. Without that callback, the SDK returnsdecline. This is distinct from the existing Codex app-access path.Proposed narrow scope
Route approval-only MCP form elicitations through T3's existing
mcp-elicitationapproval UI. Return a one-time accept only after explicit approval; preserve decline/cancel and fail closed for forms requesting values or URL-mode elicitations. Cover cancellation and late responses with focused tests.Could maintainers confirm whether this direction and scope are approved for a focused PR?