Skip to content

fix(hopper): clarify hardened client automation recovery - #9916

Closed
twotnguyen wants to merge 5 commits into
morluto:mainfrom
twotnguyen:fix/9879-hopper-hardened-apple-events-guidance-w1
Closed

twotnguyen wants to merge 5 commits into
morluto:mainfrom
twotnguyen:fix/9879-hopper-hardened-apple-events-guidance-w1

Conversation

@twotnguyen

@twotnguyen twotnguyen commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #9879. When macOS refuses Hopper Apple Events, report a typed launch rejection and explain how to recover when the client lacks the hardened-runtime automation entitlement. Retrying from the same unauthorized client cannot succeed until authorization changes.

Change and contract

The launcher classifies the existing pre-handoff denial as apple_events_authorization / not_authorized. The CLI and MCP error retains provider_unavailable and reports category: unavailable, retryable: false, and details.retry_action: unknown, with the rejection in details.launch_rejection. The diagnostic cannot distinguish a missing Automation grant from a missing entitlement.

The remediation points to macOS Automation settings, the client developer for a missing entitlement, or an authorizable client such as Terminal. Installation guidance describes the same options. No target execution or authorization behavior is changed.

Validation

  • npm run check:fast — passed.
  • npm run test:focused -- src/domain/analysisErrorProjection.test.ts tests/acceptance/providers/hopperStartupRecovery.test.ts tests/boundary/providers/hopper/hopperClient.helperFailure.test.ts — 108 passed on macOS after the merge conflict resolution.
  • npm run test:focused -- tests/acceptance/providers/hopperStartupRecovery.test.ts — passed after the guidance update (5 tests).
  • The acceptance and boundary tests simulate launcher outcomes; they do not establish behavior with a real Hopper GUI or a hardened client.

Author readiness

Human owner: @twotnguyen

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T14:33:57.209375Z 89eb7ad New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

cursoragent and others added 4 commits November 11, 2026 02:45
Bring the contributor branch up to current main before the structured denial change.
Co-authored-by: morluto <[email protected]>
Classify the macOS helper's Apple Events refusal as a launch rejection
and project it as unavailable and not retryable from the same client.
# Conflicts:
#	src/domain/analysisErrorPresentation.ts
gensokyo-dev added a commit that referenced this pull request Nov 14, 2026
A hardened-runtime client without the Apple Events automation
entitlement got generic Automation advice, and the projection kept
retryable: true, so agents retried from the same unauthorized client.
The denial is now a typed launch rejection whose message and recovery
name the entitlement and the Automation setting, with retry turned off.

Fixes #9879

Squashed from #9916 and rebased onto main.

Co-Authored-By: morluto <[email protected]>
Co-Authored-By: gensokyo-dev <[email protected]>
gensokyo-dev added a commit that referenced this pull request Nov 14, 2026
A hardened-runtime client without the Apple Events automation
entitlement got generic Automation advice, and the projection kept
retryable: true, so agents retried from the same unauthorized client.
The denial is now a typed launch rejection whose message and recovery
name the entitlement and the Automation setting, with retry turned off.

Fixes #9879

Squashed from #9916 and rebased onto main.

Co-Authored-By: morluto <[email protected]>
Co-Authored-By: gensokyo-dev <[email protected]>
N0zoM1z0 pushed a commit that referenced this pull request Nov 14, 2026
A hardened-runtime client without the Apple Events automation
entitlement got generic Automation advice, and the projection kept
retryable: true, so agents retried from the same unauthorized client.
The denial is now a typed launch rejection whose message and recovery
name the entitlement and the Automation setting, with retry turned off.

Fixes #9879

Squashed from #9916 and rebased onto main.

Co-Authored-By: morluto <[email protected]>
Co-Authored-By: gensokyo-dev <[email protected]>
@N0zoM1z0

Copy link
Copy Markdown
Collaborator

Thank you for this fix. It landed in #10499 with your authorship kept on the commit (adapted where noted in the PR), so I'm closing this PR as superseded.

@N0zoM1z0 N0zoM1z0 closed this Nov 14, 2026
@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working provider: hopper Analysis provider / engine: hopper labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working provider: hopper Analysis provider / engine: hopper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Hopper Apple Events denial gives unactionable recovery when the MCP client is a hardened app without the automation entitlement

4 participants