Skip to content

fix(desktop): allow macOS agent helpers to request Automation access - #23254

Closed
juliusmarminge wants to merge 3 commits into
mainfrom
fix/issue-21282
Closed

juliusmarminge wants to merge 3 commits into
mainfrom
fix/issue-21282

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Problem

When Codex runs Computer Use inside the signed macOS desktop app, its native turn-ended helper cannot request Apple Events access because T3's signing entitlements omit Automation. The reported result is failed cleanup and a cursor that remains visible after the turn; the app also lacks the Automation usage description.

Change

Add com.apple.security.automation.apple-events to the existing generated macOS entitlement plist and NSAppleEventsUsageDescription to the macOS Info.plist configuration. Cover both declarations in the existing desktop packaging tests.

Scope and approval

Fixes https://git.cafe/pingdotgg/t3code/issues/21282
GitCafe: https://git.cafe/pingdotgg/t3code/issues/21282
Triaged bug via the automated issue flow: #21282.

Verification

  • Before implementation: the new assertions fail for the missing entitlement and usage description, with 2 failed / 41 passed. After implementation: all 43 desktop packaging tests pass.
  • PATH="$PWD/node_modules/.bin:$PATH" vp test run scripts/build-desktop-artifact.test.ts: 43 passed again after merging current main, at 6ea8952975. Integrated-head test log.
  • Targeted lint, formatting, scripts typecheck, and whitespace checks pass. Both independent reviewers found no code defects.
  • Real exported configuration functions emit both declarations and the signed-build entitlement path. These checks verify generated configuration, not native cleanup.
Evidence Before After
Focused packaging tests 2c467424bb: 2 failed / 41 passed c2405f2124: 43 passed
Generated configuration Missing declarations asserted by the red tests Configuration transcript

Fixture matrix and proof boundaries · Scoped verification log

No render paths changed, so UI screenshots and pixel diffs do not apply. cannot-verify macos-desktop: this Linux VM cannot inspect the final signed app, exercise macOS Automation consent/denial/recovery, or record Codex helper completion and cursor cleanup (matrix A1 and N1–N3). No end-to-end native success is claimed.

Models: Claude Opus 5.5 through Claude Agent; GPT-6.1-Sol through Codex in T3 Code.

Fixes #21282

juliusmarminge and others added 3 commits October 22, 2026 01:30
…usage description

Signed macOS builds lack com.apple.security.automation.apple-events and
NSAppleEventsUsageDescription, so tccd rejects Apple Events from coding
agents (Codex SkyComputerUseClient). These assertions fail until fixed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…OS app

Claim com.apple.security.automation.apple-events in the generated signing
entitlements and declare NSAppleEventsUsageDescription, so tccd stops
rejecting Apple Events from coding agents (Codex computer use) that inherit
the app's TCC identity.

Refs #21282

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 22, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This changes the default macOS artifact permissions by adding Apple Events automation entitlement and its user-facing usage description, allowing agent helpers to request control of other apps. The scope is small and tested, but the security-sensitive permission and product-default change warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The macOS build configuration now includes an Apple Events usage description and automation entitlement. Tests assert that both declarations are present.

Changes: macOS Apple Events declarations

Layer / File(s) Summary
Add and verify Apple Events declarations
scripts/build-desktop-artifact.ts, scripts/build-desktop-artifact.test.ts
The rendered macOS entitlements enable Apple Events automation, and the build configuration sets an Apple Events usage description. Tests assert both declarations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • pingdotgg/t3code issue 21283 concerns analogous macOS privacy declarations for Calendar. This change adds Apple Events declarations but does not add Calendar declarations.

Suggested reviewers: t3dotgg

Merge Risk: Minimal · up to 6ea89

The macOS permission declarations are in place, with no identified issue blocking merge. Automation consent in a signed app has not yet been exercised.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title is concise, specific, and accurately describes the primary change: allowing macOS agent helpers to request Automation access.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers the problem, change, linked triaged issue, and focused verification results. It also states the limits of Linux-based testing and identifies the models and harnesses used.
Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
ℹ️ Recent review info

⚙️ Run configuration

  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: c083ac62-2f60-43c3-9939-0b4c0dc45be2
📥 Commits

Reviewing files that changed from the base of the PR and between 6318bfc and 6ea8952.

📒 Files selected for processing: 2

  • scripts/build-desktop-artifact.test.ts
  • scripts/build-desktop-artifact.ts

Limit details: You’ve used all 10 included reviews currently available.

@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:needs-julius Needs Julius: route gate, unverifiable surface, or blocked labels Oct 22, 2026

@marco-altran marco-altran left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a welcome fix!

Copy link
Copy Markdown
Member Author

Thanks for this. https://git.cafe/pingdotgg/t3code/pulls/33869 makes the same change and is the one being kept.

#33869 adds the same Automation entitlement and usage description with a smaller change. It also checks the description across signed and unsigned stable and nightly configurations, making it the stronger version to keep.

Your diagnosis and the two missing declarations remain the basis of the fix. The remaining validation is to exercise Automation consent and Computer Use cleanup in a signed macOS build.

Closing as a duplicate.

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

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop pr:needs-julius Needs Julius: route gate, unverifiable surface, or blocked size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: macOS missing Automation entitlement prevents Codex Computer Use cleanup

2 participants