Repository navigation
Description
Summary
Typing @ followed by prose in the composer keeps the mention typeahead open for the next 255 characters, showing "Searching mentions…" / "No matching mentions" and re-running the mention search on every keystroke. The menu only closes once the @ falls out of a fixed 256-character scan window. Expected: once a multiword @ query plainly matches nothing, the menu should close and the text should stay plain prose, the same way an unmatched / command already does.
Versions and environment
- bb 0.48.1 (CLI), macOS 26.5.2
- Code checked on
get-bb/bbmainat642267b7f7 - Composer plugin (
plugins/composer), default@mention trigger; no provider involvement
Steps to reproduce
- Open any thread's composer.
- Type this prompt, character by character, on one line:
in the composer plugin, allow me to @[model name/reasoning level/machine/project/permission mode] in the composer input (selection shown like the normal mentions) and after it's selected the chip just immediately dissapears but the model/reasoning level/machine/project is set to the composer. only starred model in the model picker should show up in the @ - Watch the mention menu from the first
@onward.
The menu stays open while typing the next 255 characters (through …set to the composer. o) and then closes on its own. Any @ preceded by a space reproduces it; the brackets and slashes are not required.
Expected vs actual
Actual (findActiveTrigger on the prompt above, caret after N characters; first "@" is at index 36):
caret 37 -> mention, from 36, query ""
caret 60 -> mention, from 36, query "[model name/reasoning l" (23 chars)
caret 200 -> mention, from 36, query "[model name/reasoning level/…" (163 chars)
caret 291 -> mention, from 36, query length 254
caret 292 -> null (the "@" left the 256-char scan window)
Expected: the trigger ends, or the menu hides, once the multiword query has no results, rather than tracking the @ until the scan window drops it.
Evidence
Cause (observed in code):
find-active-trigger.ts#L52-L55: since Support multiword mention autocomplete sessions #2345 the mention query pattern is(?:[^\s@]| )*, so plain spaces never end an@query. Only a tab, newline, or another@ends it.find-active-trigger.ts#L58-L68: the only other end isTRIGGER_SCAN_WINDOW = 256. Once the caret is more than 256 chars past the@, the windowed regex needs a boundary character before@inside the window, and that character has been dropped. The 255-character limit comes from this window, not from intended behavior.PromptBoxInternal.tsx#L2318-L2331: commands hide when they have zero results (isCommandTriggerLiteral). Mentions have no equivalent, soshowTypeaheadMenustays true with "No matching mentions".
Repro method: a scratch Vitest file in plugins/composer/src/mentions/ called the real findActiveTrigger with triggers [{ char: "@", kind: "mention" }, { char: "/", kind: "command" }] for every caret position in the prompt above. The table above is its output.
What you ruled out
- Not a duplicate: searched open and closed issues for mention, multiword, typeahead, and "No matching mentions". Composer @ picker serves stale and missing threads and projects (realtime-only cache, 200-entry cap, ungated path rows) #5475 and Search and typeahead stall on full-text SQL, repeated file discovery, and slow mention providers #4413 cover result freshness and latency, not trigger termination.
- Not specific to the brackets or slashes in the text. Any space-preceded
@followed by more than one word of prose reproduces it. - Dismissal works as designed: Escape and the touch "Close suggestions" button close it, and Support multiword mention autocomplete sessions #2345's dismissal tracking keeps it closed while the occurrence grows. The bug is that the user has to dismiss it at all.
Possible fix directions (for triage, not prescriptive):
- End a multiword mention session once a query containing a space returns zero results after loading, and treat the
@as literal likeisCommandTriggerLiteral. - Cap multiword queries at a small number of words or characters instead of relying on the scan window.
Suggested priority and effort
Medium: it hits anyone who writes @ mid-prose, such as specs, emails, or the @ syntax itself. There is a workaround (Escape), and no text is lost. Effort is probably low.
Reported from bb thread @thread:thr_i23unmchia.
AGENT GENERATED
Activity
bb-slop-cop commentedon Nov 4, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotui,confirmed-repro.Dismiss settled-empty multiword mention sessions (get-bb#7002)