Skip to content

feat(mcp): elicitation during tool execution — phase 2 #2522

@bug-ops

Description

@bug-ops

Context

MCP Elicitation support was added in #2521. A known architectural limitation: elicitation requests arriving while the agent loop is blocked waiting for an MCP tool call result always time out, because process_pending_elicitations is only called at turn boundaries.

Required work

Implement elicitation handling during tool execution:

  • Detect elicitation events mid-tool-await (select on both tool result and elicitation_rx)
  • Pause tool execution or buffer the elicitation, prompt the user, resume
  • Ensure no deadlock between MCP server handler and agent loop

Phase 2 scope

  • TUI interactive dialog widget for elicitation
  • Telegram inline keyboard / reply-based elicitation flow
  • Elicitation during tool call execution

Related: #2486, PR #2521

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexityenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions