MCP elicitation dialogs intermittently fail to render (instant 'User cancelled', backend not called)
Title: MCP elicitation dialogs intermittently fail to render (instant "User cancelled", backend not called)
Environment: Claude Code 2.1.220 (Homebrew cask), macOS (Darwin 25.x), zsh. Remote MCP server: claude.ai-managed connector (enterprise gateway) whose write tools request an elicitation (confirmation form with a required boolean field) before executing.
Symptom: invoking the MCP tool intermittently returns User cancelled the confirmation prompt. Backend was not called. immediately, with NO dialog rendered in the terminal. When the dialog does render, it works correctly (form completes, backend executes).
Frequency & matrix (~20 attempts over 6 days):
- Terminal.app: 7/7 rendered and succeeded
- iTerm2 3.6.11: 2/13 rendered; 11 instant-cancelled with no render
- Same binary, same day: rendered at 14:51, failed from ~15:40 onward including a brand-new session's first tool call
Eliminated as causes (each varied independently, failure persisted):
permission settings (defaultMode default/auto, skipAutoPermissionPrompt both values), per-session shift+tab mode (manual confirmed), concurrent Claude sessions (closed), MCP credential state (OK), VPN/network, hooks (none match the MCP tool), CLI restart, /mcp reconnect, connector re-auth.
Additional observations:
- If the dialog renders but is unanswered until the call is backgrounded (~310s idle timeout), the dialog detaches and the task zombies; a subsequent approval can land on a DIFFERENT pending write's dialog.
- /debug produced no visible output in one affected session.
Ask: instrumentation/fix for elicitation render path; ideally a log line when an elicitation is auto-cancelled explaining why.