[BUG] swift-lsp@claude-plugins-official blocks autonomous multi-file refactors with per-edit compilation validation
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?
The swift-lsp@claude-plugins-official plugin blocks autonomous operation during multi-file refactors. It validates Swift compilation after every individual file edit and halts execution when it detects unresolved type references — even though intermediate broken states are expected and normal during refactors that span multiple files. This happens even with --dangerously-skip-permissions flag or defaultMode: "dontAsk" setting enabled.
What Should Happen?
In autonomous/don't-ask mode, the plugin should either defer validation until the task completes, warn but continue rather than blocking, or recognize multi-file refactor patterns and suppress intermediate validation. Users who explicitly opt into autonomous mode should not have execution halted by per-edit compilation checks.
Error Messages/Logs
PostToolUse:Edit hook stopped continuation: The file contains multiple unresolved type references (GameState, DifficultyLevel, UserMessage, PersistedLevelStats) that are missing from scope. These compilation errors must be resolved before the edit can be considered valid.
Steps to Reproduce
- Enable swift-lsp@claude-plugins-official in ~/.claude/settings.json
- Launch Claude Code with --dangerously-skip-permissions (or set defaultMode: "dontAsk")
- Open a Swift project with a property used across multiple files
- Ask Claude to rename that property across the codebase
- Claude edits the first file, plugin validates, sees unresolved references in files not yet updated, and halts execution
- Session stalls waiting for user input despite autonomous mode being enabled
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.1
Claude Code Version
2.1.2 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
- Claude Code version: 2.1.2
- macOS, Xcode project with SwiftUI
- When Claude code gets stuck just instruct it to "continue. ignore the hook for now". I suspect any prompt will restart Claude code and nudge it to continue.
- Suggested fix: Add a config option for batch validation at task completion rather than per-edit, or have the plugin respect autonomous mode by logging warnings without blocking
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗