Skip to content

Skip user hooks during Claude capability probes#4466

Open
yashranaway wants to merge 1 commit into
pingdotgg:mainfrom
yashranaway:claude-probe-disable-hooks
Open

Skip user hooks during Claude capability probes#4466
yashranaway wants to merge 1 commit into
pingdotgg:mainfrom
yashranaway:claude-probe-disable-hooks

Conversation

@yashranaway

@yashranaway yashranaway commented Jul 24, 2026

Copy link
Copy Markdown

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 or auth flows.

Overview
The periodic Claude capability probe now passes settings: { disableAllHooks: true } in its SDK query options so SessionStart and other user hooks do not run on every few-minute health check.

The probe still loads user, project, and local setting sources for slash-command discovery; only hook execution is turned off via the settings flag (serialized as --settings at the SDK boundary). Tests cover the built options object and the parsed CLI flag.

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

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 808ff80.

The periodic capability probe loads user, project, and local setting
sources for slash-command discovery, which also ran the user's
SessionStart hooks every few minutes. Pass disableAllHooks through the
flag settings layer so probes stay quiet while command discovery keeps
working.

Fixes pingdotgg#3050
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

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: cb233ab8-fe8f-4a60-a261-d7a0ff055d36

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jul 24, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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.

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.

[Bug]: probeClaudeCapabilities runs every 5 minutes and invokes sessionStart hooks

1 participant