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
Question Tool Keyboard Conflict and Agent Switch Issue #7496
QuestionPrompt displays "tab" hint but doesn't handle tab key, causing unintended agent switch
When using the Question tool with a custom primary agent that has question: allow permission, pressing Tab in the QuestionPrompt UI causes the system to unexpectedly switch to another primary agent (e.g., build).
Root Cause
Two issues were identified:
Keyboard Binding Conflict
The QuestionPrompt component displays ⇆ tab as the hint for switching between question tabs, but:
The actual implementation uses left/right or h/l keys (not tab)
The tab key event is not consumed (evt.preventDefault() is not called)
The global agent_cycle keybind defaults to tab
When user presses Tab, the event bubbles up and triggers agent switching
I think in general the question tool is very annoying to work with mainly due to the agent switching - often i am in plan mode, and i would like to switch to build mode during the question tool, but i cannot do that - or i havent found a way to do that... Tab for me swiches between the question tabs.
I think in general the question tool is very annoying to work with mainly due to the agent switching - often i am in plan mode, and i would like to switch to build mode during the question tool, but i cannot do that - or i havent found a way to do that... Tab for me swiches between the question tabs.
I guess the issue here that question tool does not consume tab key and it is passed further to agent switching
I have a fix for this and will open a PR shortly. It suspends command keybinds while modal prompts are active, using the existing pattern from autocomplete.tsx. Hope it helps!
I have a fix for this and will open a PR shortly. It suspends command keybinds while modal prompts are active, using the existing pattern from autocomplete.tsx. Hope it helps!
With your PR, how does the user know the agent was switched when pressing tab during a question prompt?
Activity
github-actions commentedon Jan 9, 2026
This issue might be a duplicate of existing issues. Please check:
Esckey 'through to the model #7384: TUI Commands modal passes Esc key through to other handlers (event propagation issue)Additionally, since this issue involves keyboard shortcuts (Tab key), please also check our pinned keybinds documentation: #4997
Feel free to ignore if none of these address your specific case.
faileon commentedon Feb 4, 2026
I think in general the question tool is very annoying to work with mainly due to the agent switching - often i am in plan mode, and i would like to switch to build mode during the question tool, but i cannot do that - or i havent found a way to do that... Tab for me swiches between the question tabs.
Mishkun commentedon Feb 13, 2026
I guess the issue here that question tool does not consume tab key and it is passed further to agent switching
Chocothin commentedon Mar 12, 2026
I have a fix for this and will open a PR shortly. It suspends command keybinds while modal prompts are active, using the existing pattern from autocomplete.tsx. Hope it helps!
malventano commentedon Apr 20, 2026
With your PR, how does the user know the agent was switched when pressing tab during a question prompt?
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.