Description
When using the ACP server (agentpool serve-acp), user selections from enum elicitation questions are incorrectly identified as cancellations.
Steps to Reproduce
- Start an ACP server with an agent that uses enum elicitation
- Present a question with multiple enum options (e.g., diagnostic questions)
- User selects a valid option (e.g., "启动时冒黑烟")
- Server responds with "User cancelled the request" instead of processing the selection
Expected Behavior
- User selection should be processed correctly
- Response should contain the selected value in the correct format
Actual Behavior
- Response shows:
"status": "completed", "content": "User cancelled the request"
- Selection is ignored despite user choosing a valid option
Root Cause
The _handle_enum_elicitation_response() function in acp_server/input_provider.py returns:
ElicitResult(action="accept", content=selected_value) # content is a string
But ElicitResult expects content to be a dict with a "value" key per MCP spec. This causes Pydantic validation to fail, throwing a ValidationError that gets caught and triggers the cancel fallback.
Affected Components
- packages/agentpool/src/agentpool_server/acp_server/input_provider.py line 374
- ACP server enum elicitation handling
- QuestionTool response processing
Workaround
None available - users are unable to complete enum elicitation flows.
Additional Context
The OpenCode server implementation (opencode_server/input_provider.py) correctly wraps the content in dict format:
ElicitResult(action="accept", content={"value": answer})
Description
When using the ACP server (
agentpool serve-acp), user selections from enum elicitation questions are incorrectly identified as cancellations.Steps to Reproduce
Expected Behavior
Actual Behavior
"status": "completed", "content": "User cancelled the request"Root Cause
The
_handle_enum_elicitation_response()function inacp_server/input_provider.pyreturns:But ElicitResult expects content to be a dict with a "value" key per MCP spec. This causes Pydantic validation to fail, throwing a ValidationError that gets caught and triggers the cancel fallback.
Affected Components
Workaround
None available - users are unable to complete enum elicitation flows.
Additional Context
The OpenCode server implementation (opencode_server/input_provider.py) correctly wraps the content in dict format: