Skip to content

fix: close claude query in probe finalizer#1757

Open
StayBlue wants to merge 1 commit intopingdotgg:mainfrom
StayBlue:fix/claude-probe-cleanup
Open

fix: close claude query in probe finalizer#1757
StayBlue wants to merge 1 commit intopingdotgg:mainfrom
StayBlue:fix/claude-probe-cleanup

Conversation

@StayBlue
Copy link
Copy Markdown

@StayBlue StayBlue commented Apr 5, 2026

What Changed

ClaudeProvider.ts uses q.close() for cleanup instead of abort.abort().

Why

abort.abort() could throw AbortError during shutdown and crash startup. q.close() uses the SDK's own disposal path, so the probe still gets initializationResult() and no longer crashes on cleanup.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk
Low risk: small, localized cleanup change in the Claude capabilities probe that should only affect process disposal behavior and reduce abort-related errors.

Overview
Updates the Claude SDK capability probe in ClaudeProvider.ts to clean up by calling q.close() in the Effect.ensuring finalizer instead of aborting via an AbortController.

This prevents AbortError-style failures during probe teardown while still allowing initializationResult() to be read for subscription detection.

Reviewed by Cursor Bugbot for commit f964cf2. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix claudeQuery cleanup in probeClaudeCapabilities finalizer

Replaces AbortController-based cleanup with an explicit q.close() call in the finalizer block of probeClaudeCapabilities in ClaudeProvider.ts. The claudeQuery instance is now stored in an outer-scoped variable q and closed during the ensuring phase, removing the abortController option from the query constructor.

Macroscope summarized f964cf2.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 58cc44f8-3810-424d-bcd1-2dab93986bdd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 5, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 5, 2026

Approvability

Verdict: Approved

Simple bug fix that improves resource cleanup by using the query's built-in close() method instead of an external AbortController. The change is small, self-contained, and only affects cleanup logic in a single function.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant