Skip to content

Cancel pending permission requests before the stop-button early return#197

Open
leonidasbarkas98-cpu wants to merge 1 commit into
andrepimenta:mainfrom
leonidasbarkas98-cpu:fix/stop-cancel-pending-permissions
Open

Cancel pending permission requests before the stop-button early return#197
leonidasbarkas98-cpu wants to merge 1 commit into
andrepimenta:mainfrom
leonidasbarkas98-cpu:fix/stop-cancel-pending-permissions

Conversation

@leonidasbarkas98-cpu

Copy link
Copy Markdown

In the process close/error handlers, _cancelPendingPermissionRequests() was placed after the if (!this._currentClaudeProcess) return; guard. After pressing Stop, the process reference is already cleared, so pending permission requests were never cancelled and stayed stuck in the UI forever.

This moves the cancellation before the early return. Related to the reliability reports in #178, #165, #115 and the analysis in PR #181.

🤖 Generated with Claude Code

_stopClaudeProcess clears _currentClaudeProcess synchronously, so by
the time the killed process emits close/error, the early-return guard
in both handlers already trips and _cancelPendingPermissionRequests
never runs, leaving permission prompts stuck. Move the cancel call
above the guard in both handlers so it always runs when the process
goes away (Gitea issue andrepimenta#3; upstream andrepimenta#181).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant