Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Remove Ask User Question tool in favor of Core tool - #3880

Merged
TylerLeonhardt merged 5 commits into
mainfrom
tyler/rich-lobster
Feb 20, 2026
Merged

TylerLeonhardt merged 5 commits into
mainfrom
tyler/rich-lobster

Conversation

@TylerLeonhardt

@TylerLeonhardt TylerLeonhardt commented Feb 20, 2026 •

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings February 20, 2026 01:42
@TylerLeonhardt TylerLeonhardt self-assigned this Feb 20, 2026
@vs-code-engineering vs-code-engineering Bot added this to the February 2026 milestone Feb 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the extension-contributed “Ask Questions” tool and switches Claude’s AskUserQuestion permission flow to invoke the VS Code core vscode_askQuestions tool instead (per issue #296134).

Changes:

  • Deleted the AskQuestionsTool implementation and its Vitest coverage; removed its tool contribution/strings from package.json / package.nls.json and deregistered it from vscode-node tool loading.
  • Introduced shared IAnswerResult/IQuestionAnswer types for parsing vscode_askQuestions results and reused them in Copilot CLI helpers.
  • Updated Claude’s AskUserQuestionHandler to call ToolName.CoreAskQuestions via IToolsService.invokeTool, and added unit tests for the handler.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/extension/tools/vscode-node/test/askQuestionsTool.spec.ts Deletes unit tests for the removed contributed AskQuestions tool.
src/extension/tools/vscode-node/askQuestionsTool.ts Removes the contributed AskQuestions tool implementation and registration.
src/extension/tools/vscode-node/allTools.ts Stops importing/registering the removed AskQuestions tool in vscode-node.
src/extension/tools/common/toolNames.ts Replaces AskQuestions with CoreAskQuestions (vscode_askQuestions) and updates categorization.
src/extension/tools/common/askQuestionsTypes.ts Adds shared types for parsing the core tool response payload.
src/extension/agents/copilotcli/node/userInputHelpers.ts Switches to shared answer-result types.
src/extension/agents/claude/vscode-node/toolPermissionHandlers/index.ts Removes side-effect import of the VS Code-node ask-user-question handler.
src/extension/agents/claude/vscode-node/toolPermissionHandlers/askUserQuestionHandler.ts Updates to invoke the core ask-questions tool via IToolsService.
src/extension/agents/claude/node/test/askUserQuestionHandler.spec.ts Adds Vitest coverage for the updated AskUserQuestionHandler behavior.
src/extension/agents/claude/common/toolPermissionHandlers/index.ts Ensures the handler self-registers from common handlers.
src/extension/agents/claude/common/toolPermissionHandlers/askUserQuestionHandler.ts New common handler implementation that delegates to vscode_askQuestions.
src/extension/agents/claude/AGENTS.md Updates docs to reference core ask-questions behavior (needs alignment with actual handler location).
package.nls.json Removes localized strings for the removed contributed tool UI.
package.json Removes the contributed copilot_askQuestions tool contribution and removes it from the vscode toolset.
Comments suppressed due to low confidence (1)

src/extension/agents/claude/vscode-node/toolPermissionHandlers/askUserQuestionHandler.ts:30

  • This file now duplicates the implementation in src/extension/agents/claude/common/toolPermissionHandlers/askUserQuestionHandler.ts, but vscode-node/toolPermissionHandlers/index.ts no longer imports it (and a repo-wide search shows no remaining imports). Consider deleting this vscode-node variant or turning it into a small re-export to avoid dead code and to prevent accidental double-registration if it gets imported again later.
export class AskUserQuestionHandler implements IClaudeToolPermissionHandler<ClaudeToolNames.AskUserQuestion> {
	public readonly toolNames = [ClaudeToolNames.AskUserQuestion] as const;

	constructor(
		@IToolsService private readonly toolsService: IToolsService,
	) { }

Comment thread src/extension/tools/common/toolNames.ts Resolved
Comment thread src/extension/agents/claude/AGENTS.md Resolved
Comment thread package.json Resolved
@TylerLeonhardt
TylerLeonhardt added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit d50c0a9 Feb 20, 2026
19 checks passed
@TylerLeonhardt
TylerLeonhardt deleted the tyler/rich-lobster branch February 20, 2026 04:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove chat ask_questions tool from vscode-copilot and vscode

4 participants