Skip to content

fix: permit internal infrastructure tools when agent mode is disabled#293357

Merged
jrieken merged 5 commits intomainfrom
joh/fix-inline-chat-exit-tool
Feb 11, 2026
Merged

fix: permit internal infrastructure tools when agent mode is disabled#293357
jrieken merged 5 commits intomainfrom
joh/fix-inline-chat-exit-tool

Conversation

@jrieken
Copy link
Copy Markdown
Member

@jrieken jrieken commented Feb 6, 2026

When agent mode is disabled (chat.agent.enabled: false), the isPermitted check in
LanguageModelToolsService filters visible tools down to only read/search/web tool sets.
This inadvertently blocks the inline_chat_exit tool — an internal infrastructure tool
required for inline chat v2 to function — causing the "Missing inline chat exit tool" error.

The fix: internal tools with canBeReferencedInPrompt: false are always permitted regardless
of agent mode, since they are system plumbing, not user-facing agent tools.

Fixes #292935

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 fixes a bug where the inline chat v2 feature failed with "Missing inline chat exit tool" error when agent mode was disabled (chat.agent.enabled: false). The issue occurred because the isPermitted method in LanguageModelToolsService filtered tools down to only read/search/web tool sets when agent mode was disabled, inadvertently blocking the inline_chat_exit tool—an internal infrastructure tool required for inline chat to function.

Changes:

  • Added a check to always permit internal tools with canBeReferencedInPrompt: false regardless of agent mode, treating them as system infrastructure rather than user-facing agent tools

Comment thread src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.ts Outdated
@connor4312 connor4312 requested review from joshspicer and removed request for connor4312 February 6, 2026 16:20
…Service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jrieken jrieken marked this pull request as ready for review February 9, 2026 08:35
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 9, 2026
@jrieken
Copy link
Copy Markdown
Member Author

jrieken commented Feb 9, 2026

@copilot Analyze test failure and fix them. Also implement suggestion from #293357 (comment)

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 9, 2026

@jrieken I've opened a new pull request, #293832, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 9, 2026 09:54
- Change condition from `!canBeReferencedInPrompt` to `canBeReferencedInPrompt === false` to only bypass agent mode checks for tools that explicitly cannot be referenced (like inline_chat_exit)
- Add test case for issue #292935 to verify internal tools with canBeReferencedInPrompt=false are permitted when agent mode is disabled
- Update comment to clarify "explicitly cannot be referenced"

Co-authored-by: jrieken <1794099+jrieken@users.noreply.github.com>
fix: restrict internal tool bypass to explicitly non-referenceable infrastructure tools
@jrieken jrieken merged commit a54b031 into main Feb 11, 2026
18 checks passed
@jrieken jrieken deleted the joh/fix-inline-chat-exit-tool branch February 11, 2026 08:28
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 31, 2026
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.

When attempting to use 'Open Inline Chat', I received the error message 'Missing inline chat exit tool'.

4 participants