You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(mentions): carry typed text segments instead of an authorized substring #2461
PR #2421 stops generated text from expanding @ mentions. The webview records the part of the chat box that the user typed. It sends that part as one string, authorizedMentionText. The extension looks for that string again in the message text and expands mentions only inside it.
This works, but it is fragile. The scope is a substring that every step must carry and find again.
Each review round found another step that lost or widened the scope: queue, image scan, edit flow, suggestions, enhanced prompt, and trim.
Ten or more call sites carry the string. A new send path can forget it.
Generated text that repeats user words, or padded text, can break the match.
Research on agent security points to the same risk. Provenance labels get lost when data moves between components. See CaMeL and the 2026 paper "Agent Data Injection Attacks are Realistic Threats to AI Agents".
Activity
edelauna commentedon Nov 15, 2026
Implemented in PR #2421 (2fa2bc1). Close this issue when the PR merges.