Repository navigation
fix(doctor): advise when Claude Desktop's TCC-disclaiming launcher will block Hopper - #11685
Diego-9612 wants to merge 2 commits into
Conversation
[Low impact] The change stays within a narrow macOS diagnostic path. The PR appears safe to merge, with a non-blocking gap for Hopper paths saved only in client settings. Findings
Fix with agent prompt### Issue 1
src/application/Doctor.ts:282-286
If Hopper is configured only in the saved Claude Desktop settings and sits outside the searched folders, this check skips the advisory. For example, run `rea setup` with `HOPPER_LAUNCHER_PATH=/custom/Hopper`, then run `rea doctor --client claude_desktop` from a shell without that variable. Both paths passed here are undefined, so users get no Apple Events warning before analysis fails.
Have the registration reader expose whether it records a Hopper launcher, without exposing the saved value, and include that fact in this check.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds a macOS doctor advisory for Claude Desktop registrations when Hopper is configured or found.
Acknowledgments: Diego-9612 explicitly chose a non-blocking advisory and disclosed that the static client fact may become stale across Claude Desktop versions. Neither is reported as an issue. Review limits: Tests were not run. Checking for a superseding PR or existing review threads was blocked because GitHub authentication was unavailable. Reviews (1) · Last reviewed commit: "fix(doctor): advise when Claude Desktop'..." · Reviewed by Greptile |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
17ba686 to
d009c56
Compare
|
Friendly ping: this is now rebased onto current Could a maintainer approve the CI workflows when convenient? I'm happy to switch the advisory to a failing scoped check if you prefer that. |
|
@Diego-9612 thanks for the PR — there is 1 open review thread here:
Could you address or reply to this? Once it's resolved and CI is green we can take another look. |
…ll block Hopper On macOS, Claude Desktop starts MCP servers through Contents/Helpers/disclaimer, which disclaims TCC responsibility. macOS then attributes Hopper's Apple Events to REA's runtime (node/bun) and denies them without prompting, while doctor still reported Hopper as available. Declare the client fact once in SupportedClients and add a non-blocking registration_apple_events:<client> advisory, emitted on darwin when the client has a REA registration and a Hopper launcher is configured or detected. Health, setup and registrations are unchanged. Refs morluto#11597 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Apple Events advisory looked at the launcher this process selected or detected, so it missed one recorded only in the Claude Desktop registration. Registration status now exposes whether the file records HOPPER_LAUNCHER_PATH, without its value, for clients that disclaim TCC responsibility. An unreadable environment establishes nothing. Use doctor's effective configured launcher, which includes REA's user configuration, instead of only the terminal's environment. Drop the validTarget override, which main removed from DoctorHost. Refs morluto#11597 Co-Authored-By: Claude Opus 5.5 <[email protected]>
d009c56 to
7c79786
Compare
|
The saved-path thread is addressed and resolved in 7c79786, and the branch merges cleanly into current |
Summary
Refs #11597 (proposal 3). Complements #12309 (merged), which fixed the denial's message and remediation. This PR warns earlier, from
rea doctor, before any Hopper call fails.On macOS, a Claude Desktop registration makes every Hopper-backed operation fail with an Apple Events denial, but
rea doctorstill reports Hopper as available, so nothing warns the user before analysis fails. This PR adds a non-blocking doctor advisory for that combination.Problem and expected behavior
Claude Desktop starts MCP servers through
Contents/Helpers/disclaimer --pgroup -- <server>, which disclaims TCC responsibility.tccdthen attributes Hopper's Apple Events to REA's runtime (node/bun) and denies them without prompting (responsible=… node,Policy disallows prompt; evidence in #11597 and in my verification on #11636). Before this change,rea doctor --client claude_desktopon that host returnedhealthy: truewith no hint.Expected: when a Claude Desktop registration exists and a Hopper launcher is configured or detected on macOS, doctor names the conflict and the working recovery (register with a client that keeps TCC responsibility, such as Claude Code, or start REA from Terminal).
Change and scope
src/application/SupportedClients.ts: declare the client fact once asdisclaimsMcpServerTccResponsibility: trueonclaude_desktop, exposed throughtccDisclaimingClientDisplayName(name).src/application/Doctor.ts:registrationAppleEventsChecksemitsregistration_apple_events:<client>next to the existingregistration_timeout:<client>advisory, using the same shape (ok: true,classification: "healthy"). Conditions:platform === "darwin", the client has a REA registration (commandnon-empty), and a Hopper launcher is configured, detected, or recorded in that registration. The name intentionally does not start withhopper, so it is not treated as a provider check and does not affecthopperAvailable,healthyorenvironment_healthy. In scoped runs it lands ininformational_checks.src/application/ClientRegistrationEnvironment.tsandClientRegistrationStatus.ts: exposerecords_hopper_launcher: true, without the value, for clients that disclaim TCC responsibility. (Review follow-up, 7c79786.)docs/getting-started/client-configuration.md: document the behavior in the Claude Desktop section.installation.mdis left alone to avoid overlapping fix(hopper): name the TCC-disclaimed runtime in Apple Events denial guidance #11636.Not included: a failing check, any setup or registration change, and the broader macOS permission readiness in #4311. Open question for maintainers (also asked in #11597): keep this advisory, or make it a failing scoped check when
hopperis a selected provider? I defaulted to advisory, since static and non-Hopper operations still work from that registration.Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
SupportedClients.ts, and doctor consumes it throughtccDisclaimingClientDisplayName. Doctor's existing registration statuses and Hopper path facts are reused, not reinterpreted.records_hopper_launcherfield in doctor's registration identity, and one additional check in doctor'schecks/informational_checksarrays, with the existingDoctorCheckshape. No schema or tool-catalog change.docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
Tests added or updated:
src/application/Doctor.test.ts,describe("Apple Events attribution advisory"):claude_desktop+ Hopper on darwin, withhealthy: true;claude_code, or for amissingClaude Desktop registration.Base reproduction or other evidence:
disclaimsMcpServerTccResponsibilityis removed fromclaude_desktop(1 failed | 4 passed);tccdattribution tonodeunder Claude Desktop's helper,com.anthropic.claude-codeunder Claude Code).User-visible CLI/MCP output: real
rea doctorfrom this branch's build, with a temporaryHOMEcontaining a Claude Desktop registration andHOPPER_LAUNCHER_PATHset:With my real
HOME(Claude Desktop has no REA registration), noregistration_apple_events:*check is emitted.Remaining proof gaps:
Validation performed
Current revision:
7c7978626, rebased ontomaine896f6054(24-nov). The rebase had no textual conflict, but the tests no longer compiled becausemainremovedDoctorHost.validTarget; that override is dropped. Results on this revision:npx vitest run src/application/Doctor.test.ts src/application/DoctorRegistrationEnvironment.test.ts— 109 passed. Three mutations of the follow-up each fail one regression.npm run check:fast— passed.npm run docs:check— passed.npm run check:changed— 687 passed, 2 skipped, 1 failed (DesktopBuildDoctorFactsgzip test, which also fails on unmodifiede896f6054on this host).rea doctorwith a temporaryHOMEand the launcher recorded only in the registration — advisory present with--client claude_desktop, no scope,--provider hopper, and two clients; with--client claude_desktop, absent when the registration records no launcher.Earlier revisions:
Rebased onto
mainat436977b0(21-nov). The only conflict was insrc/application/SupportedClients.ts:mainremovedsupportedClientRegistrationProfile(moved to a test fixture in48e27e19) next to the newtccDisclaimingClientDisplayName. I kept the new helper and the removal. After the rebase:npm run test:focused -- src/application/Doctor.test.ts src/application/Doctor.lifecycle.test.ts src/application/DoctorRegistrationEnvironment.test.ts— 113/113 passed.npm run check:fast— passed.npm run docs:check— passed (8/8).npm run build:cachedand realrea doctor— advisory present with a Claude Desktop registration and Hopper (healthy: true), absent with my realHOME.Original validation (before the rebase):
All on macOS 26.6.2 arm64 with Node 24.22.1 (
.nvmrc).npx vitest run src/application/Doctor.test.ts(after rebasing ontof14e9a1) — 96/96 passed.npm run test:focused -- src/application/Doctor.test.ts src/application/Doctor.lifecycle.test.ts src/application/DoctorRegistrationEnvironment.test.ts(on7af53a1, before rebase) — 111/111 passed.npm run check:fast(after rebase) — passed.npm run docs:check(before rebase) — passed (readme consistency 8/8).npm run check(before rebase):format:checkandmetadata:checkpassed;knipfailed with the same unused-file/export list on the unmodified base7af53a1(src/cli/domainInput.ts,src/cli/options.ts, …), so it is pre-existing;verify:architecture-guardsandknip:productionpassed when run individually;lint:typedreported 4switch-exhaustiveness-checkerrors, all in files this PR does not touch (src/domain/jsonDuplicateMember.ts,src/browser/CdpCaptureEvents.ts,src/browser/CdpObservationSession.ts,src/inspector/V8InspectorProvider.ts). Not re-run on base.npm run build:cached, then the realrea doctorruns shown above — advisory present in the positive case, absent in the negative case.Compatibility, safety, and release
Author readiness
Human owner: @Diego-9612
Before merge
type(scope): outcome.🤖 Generated with Claude Code