Skip to content
Source
Sign inSign up
pingdotgg/t3code

Skip user hooks during Claude capability probes #4466

Mergedyashranaway(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/4466/headmerged by juliusmarminge View on GitHub

What Changed

Pass settings: { disableAllHooks: true } to the periodic Claude capability probe, with regression assertions in both probe tests.

Why

The probe keeps user, project, and local setting sources so slash command discovery works, but loading those sources also runs the user's SessionStart hooks every few minutes. Hooks that log or send telemetry fire on every health check and pollute their data with probe sessions. Disabling hooks through the flag settings layer keeps command discovery intact while making the probe silent.

Fixes #3050

Testing

  • vp test run apps/server/src/provider/Layers/ClaudeCapabilitiesProbe.test.ts passes (2/2), including a new assertion on the built query options and one on the serialized --settings flag at the SDK boundary
  • pnpm typecheck in apps/server clean
  • vp lint on changed files clean

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 Narrow change to probe-only SDK options with regression tests; no impact on normal Claude sessions.

Overview Periodic Claude capability probes now pass settings: { disableAllHooks: true } in buildClaudeCapabilitiesProbeQueryOptions, so user/project/local setting sources still load for slash-command discovery but SessionStart and other hooks do not run on every few-minute health check.

Tests assert the built options include disableAllHooks: true and that the SDK invocation serializes the same value on the --settings CLI flag.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 60b7ba2cb869ea4c18ccdd15f485ce6c1debe668. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Skip user hooks during Claude capability probes by passing disableAllHooks: true

Adds settings: { disableAllHooks: true } to the options returned by buildClaudeCapabilitiesProbeQueryOptions in ClaudeProvider.ts, ensuring user-defined hooks do not run during capability detection. Tests in ClaudeCapabilitiesProbe.test.ts verify the --settings flag is present and that disableAllHooks is set to true.

Macroscope summarized 60b7ba2.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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 Plus

      Run ID: 32d901dd-a082-4eb9-9cb5-7f591467a347

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Approvability

      Verdict: Approved

      This is a targeted bug fix that prevents user hooks from running repeatedly during Claude capability probes (health checks). The change is minimal, well-documented, and includes test coverage.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. juliusmarminge merged thisdb02c6b

    5. juliusmarminge closed this

Sign in to join this conversation.