-
Notifications
You must be signed in to change notification settings - Fork 2k
Bug: Accidental tab switch to Plan mode interrupts YOLO/auto-accept-edits mode AI response and edits #2210
Copy link
Copy link
Open
Description
Bug Report
What happened?
When using YOLO mode (-y flag) or auto-accept-edits mode, if I accidentally press the tab key that switches to Plan mode, the AI response gets interrupted and the edit doesn't continue. The mode switch causes the ongoing response to be skipped/cancelled.
This is problematic because:
- The tab key is easily hit accidentally during normal usage
- An in-progress AI response and file edits are lost
- There's no way to recover the interrupted response
- The mode switch should not affect ongoing operations
What did you expect to happen?
When an AI response is actively streaming or edits are being applied:
- Tab key presses should be ignored/buffered until the current operation completes
- Mode switches should not interrupt ongoing AI responses or edit applications
- If a mode switch is requested during an active operation, it should either:
- Be queued and applied after the operation completes
- Show a warning that the operation must complete first
- Be completely ignored until the operation finishes
The mode state should remain in YOLO/auto-accept-edits mode until the AI finishes its current response and all edits are applied.
Client information
Client Information
Run qwen to enter the interactive CLI, then run the /about command.
$ qwen /about
# Please paste the output hereLogin information
No response
Anything else we need to know?
Affected components:
packages/cli/src/ui/- Tab key handling and mode switching logicpackages/vscode-ide-companion/- VS Code extension mode switching- Mode switching implementation across both CLI and IDE extensions
Suggested fix approach:
- Add a check for ongoing AI responses before processing mode switch requests
- Implement a "lock" mechanism during active operations that prevents mode changes
- Consider adding a confirmation dialog for mode switches during active operations (optional)
- Ensure the tab key handler checks operation state before triggering mode switch
Reproduction steps:
- Start Qwen Code in YOLO mode:
qwen -y - Give the AI a task that requires multiple file edits
- While the AI is responding/editing files, press the tab key
- Observe that the mode switches to Plan mode and the response/editing stops
Related behavior:
This issue affects both:
- Terminal CLI with tab key mode cycling
- VS Code extension with mode switching
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels