[BUG] Auto-accept edits not working in git worktrees (JetBrains plugin)
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?
When using the Claude Code JetBrains plugin with "auto-accept edits" enabled, file change confirmation dialogs (git diff/changes window) still pop up when Claude Code is working in a git worktree. This does not happen when working in the main repository — auto-accept works correctly there.
What Should Happen?
Auto-accept edits should suppress file change confirmation dialogs in git worktrees the same way it does in the main repository.
Error Messages/Logs
N/A — no error, just unwanted confirmation dialogs
Steps to Reproduce
- Open a project in PyCharm with the Claude Code JetBrains plugin installed
- Enable "auto-accept edits" (shift+tab)
- Use
--worktreeorEnterWorktreeto work in a git worktree - Have Claude make file edits in the worktree
- Git diff/changes confirmation dialogs appear despite auto-accept being on
- Compare: make edits in the main repo with auto-accept on — no dialogs appear
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Latest
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
PyCharm integrated terminal (JetBrains plugin)
Additional Information
The key differentiator is that auto-accept works correctly in the main repo but not in worktrees. This suggests the plugin may not be recognizing the worktree directory as part of the IDE project for purposes of auto-accept behavior.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗