[BUG] Switching VS Code editor tabs with Ctrl+Tab changes Claude Code permission mode erratically
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I'm using Claude Code through the VS Code extension (not the integrated terminal). I've set up custom VS Code keybindings to switch between Claude Code editor windows. The shortcuts are:
- Ctrl+Tab: switch forward to the next editor tab
- Ctrl+Shift+Tab: switch backward to the previous editor tab
These are configured in VS Code's keybindings.json. My default Claude Code permission mode is set to "bypass permissions". When I use these shortcuts to switch between tabs, the permission mode changes to a different mode without any user action.
What Should Happen?
Switching between editor tabs should not affect the permission mode of any Claude Code session. Each session's permission mode should stay as the user set it.
Error Messages/Logs
Steps to Reproduce
- Set up custom VS Code keybindings for Ctrl+Tab (forward) and Ctrl+Shift+Tab (backward) to switch editor tabs
- Open multiple Claude Code editor windows/tabs in VS Code
- Set permission mode to "bypass permissions"
- Use the shortcuts to switch between tabs
- Observe that the permission mode has changed unexpectedly
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
v2.1.37
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗