Fix: Issue #115 - Stop button fails to halt all Claude Code operations #153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IMPORTANT: This proposed fix for for Issue #115 was generated by Claude Code and I have not tested it. I've perused through it and it looks promising, but I cannot guarantee anything about its suitability; as an engineer, I have limited experience developing VS Code extensions and my only experience with Claude Code is as a user of the tool.
My intent here is simply to offer a slight boost in the direction of a solution. @andrepimenta could certainly have done this himself, but I figured I'd throw it out there in case it's useful, as the Stop button issue is the top frustration I personally have with this otherwise excellent extension. 😁 Thanks.
Following is generated by Claude Code:
This commit addresses the issue where the Stop button did not fully stop Claude Code operations in all cases. The implementation now ensures that clicking Stop immediately ceases ALL operations.
Key improvements:
AbortController Integration
Pending Permission Cleanup
Event Listener Management
Auto-save Cancellation
Enhanced Process Termination
New Session Cleanup
The Stop button now:
This ensures users have full control over Claude Code execution and can stop operations at any time without lingering background tasks.