Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Add a project whose remote is an Azure DevOps Services repository (
dev.azure.com), withaz+ theazure-devopsextension signed in. - Open one of its pull requests in the pull request panel and switch to the Code tab. The diff renders fine.
- Try to select a line range (or use the gutter button) in order to use Add to agent and ask the agent about those lines.
Expected behavior
Line selection and Add to agent work the same way they do for a GitHub pull request. Sending a selection to the local agent does not post anything to the host, so it should not depend on whether the host supports writing review comments.
Actual behavior
Line selection and the gutter utility are disabled entirely for Azure DevOps pull requests, so there is no way to reach Add to agent from the Code tab.
The cause: in PullRequestCodeTab.tsx, both the selection and the draft that carries the Add to agent secondary action are gated on the host's ability to post inline review comments:
const canCommentOnLines = review.inlineComment && commit === null;if (!range || !canCommentOnLines) return;inbeginCommentenableGutterUtility/enableLineSelection: canCommentOnLines && draft === null- Add to agent is only a secondary action of that same draft
The Azure DevOps provider deliberately declares review: { inlineComment: false, ... }, so canCommentOnLines is always false there and the agent path goes away with it. The same presumably applies to any host, or any viewer without comment permission, where inlineComment resolves to false.
A possible fix: gate selection on review.inlineComment || onAddToAgentSelection !== undefined, and when the host cannot comment, open a draft that offers only Add to agent (no "Add to review").
Impact
Major degradation or frequent failure
Version or commit
v0.0.45; the gating is unchanged on main @ 348f217
Environment
Azure DevOps Services (dev.azure.com) repository, Azure CLI with the azure-devops extension, T3 Code server on Linux
Workaround
Reference lines manually in the chat composer (path/to/File.kt:42) instead of selecting them in the Code tab.
Activity
juliusmarminge commentedon Oct 14, 2026
Note
Grok responding on behalf of Julius.
Confirmed on main: this is a bug, not intended gating. In
PullRequestCodeTab.tsx,canCommentOnLines(L375) is derived fromreview.inlineComment, and that one flag controlsbeginComment,enableGutterUtility, andenableLineSelection. Add to agent only shows up as a secondary action on that same draft, so it disappears whenever the host can't post inline comments. Azure DevOps hard-codesinlineComment: false(AzureDevOpsPullRequestProvider.tsL72), and L368 also ANDs inviewer.comment. That means a GitHub viewer without comment permission loses Add to agent too, even though it never writes to the host.The PR view has no other entry point for Add to agent (no context menu or Files-panel action), so the only workaround is the one you gave: reference
path:linein the composer.Direction: gate selection on
review.inlineComment || onAddToAgentSelection, and when commenting isn't available, open a draft that offers only Add to agent.t3-code-bot commentedon Oct 21, 2026
closing as addressed by #19701, merged into main: the PR Code tab allows local Add to agent line selection independently of host inline-comment permission, including Azure DevOps. Agent-only submission does not queue or post a host review.
thanks for reporting this. if you still face it on a build containing this fix, please ask us to reopen this issue or open a new issue linking back here, with your version, os and reproduction steps.
closed at the request of @UtkarshUsername.