Repository navigation
Default Claude AskUserQuestion to allow free-form input - #336285
David Anthoff (davidanthoff) wants to merge 1 commit into
Conversation
The Claude Agent SDK never sends allowFreeformInput on AskUserQuestion questions - its tool schema tells the model not to include an "Other" option because the harness UI is expected to provide one automatically. The Claude agent defaulted the absent flag to false, so the chat UI never showed the free-text field. Default it to true instead; an explicit false from the SDK is still honored. Fixes microsoft#335933 Co-Authored-By: Claude Fable 5 <[email protected]>
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: TylerLeonhardtMatched files:
|
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation matches existing carousel semantics and has appropriate regression coverage.
Pull request overview
Defaults Claude AskUserQuestion prompts to permit free-form answers while preserving explicit SDK overrides.
Changes:
- Defaults
allowFreeformInputtotrue. - Adds coverage for absent, enabled, and disabled values.
File summaries
| File | Description |
|---|---|
claudeInteractiveTools.ts |
Updates question mapping and documents the default. |
claudeInteractiveTools.test.ts |
Verifies default and explicit behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
I've run the equivalent change as a local patch since 2026-09-25, now on VS Code 1.141.0 (macOS arm64), using the built-in Claude agent signed in with a Claude subscription. In the built to |
Fixes #335933
When the built-in Claude harness asks a multiple-choice question via the
AskUserQuestiontool, the chat UI shows only the fixed options and never the free-form "Other" text field that the Claude Code extension always offers.The Claude Agent SDK never sends an
allowFreeformInputfield onAskUserQuestionquestions — the tool schema explicitly instructs the model not to include an "Other" option because "that will be provided automatically" by the harness UI. The workbench question carousel (createInputRequestCarouselinstateToProgressAdapter.ts) already defaults an absentallowFreeformInputtotrue, butbuildAskUserSessionInputQuestionsin the Claude agent explicitly forced it tofalse, so the free-text field never appeared.This change defaults the absent flag to
trueinstead. An explicitfalsefrom the SDK is still honored. No other changes are needed:flattenAskUserAnswersalready folds freeform answers into the value sent back to the SDK, and the MCP-elicitation path (which intentionally setsallowFreeformInput: falsefor strict enums) is untouched.Testing: updated the
buildAskUserSessionInputQuestionsunit tests to cover absent →true, explicitfalse→false, and explicittrue→true; ran theclaudeInteractiveTools,claudeAgent, andclaudeElicitationnode unit suites (303 passing).This PR was written by Claude (Anthropic's Claude Code) on behalf of David Anthoff (@davidanthoff).
🤖 Generated with Claude Code