[macos] Accessibility permission prompt reappears every ~10s even after granting access
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- desktop, operating-systems
Research direction
Start in aw_watcher_window/macos.swift, reading checkAccess() and the start() retry block to trace when prompts and polling occur. Check macos_permissions.py only to keep its separate one-shot dialog in scope. Done means the helper prompts at most once per launch, then polls silently so a permission granted in System Settings takes effect without restart.
Written by the indexing model from the issue text.
Description
Describe the bug
On macOS, the system Accessibility permission prompt ("ActivityWatch" would like to control this Mac / "Device control and data access" on macOS 26+) reappears roughly every 10 seconds while ActivityWatch is running, even though access has already been granted in System Settings.
Environment
- OS: macOS 27.0 (also applies to earlier versions; on macOS 26+ the setting is named "Device control and data access")
- ActivityWatch version: 0.14.0b9 (locally built .app, adhoc-signed, copied to /Applications)
- Watcher strategy: swift (default on macOS)
Root cause
The process requesting access is not the top-level ActivityWatch.app — it is the nested helper aw-watcher-window-macos (a different code identity / cdhash). Granting "ActivityWatch" in Settings therefore does not satisfy the helper, and the helper stays untrusted.
Worse, the helper re-prompts on every retry: checkAccess() in aw_watcher_window/macos.swift calls AXIsProcessTrustedWithOptions with kAXTrustedCheckOptionPrompt=true, and start() retries checkAccess() every 10s on failure — so an untrusted helper prompts forever at 10s intervals. The prompt is labeled with the bundle name ("ActivityWatch"), which makes it look like the grant did not stick.
Adhoc-signed / locally built bundles make this more likely (any rebuild rotates the cdhash and invalidates prior grants), but the prompt loop affects any setup where the helper itself is not the granted identity.
Expected behavior
Prompt at most once per helper launch; afterwards poll silently so a grant made in Settings takes effect without restart (and without nagging).
Notes
- The Python wrapper's own dialog (
macos_permissions.py, "Missing accessibility permissions") is a separate, one-shot alert and is not the source of the loop. - Related code:
aw_watcher_window/macos.swiftcheckAccess()and thestart()retry block.
- Dominant language
- Python
- Stars
- 133
- Forks
- 92
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ActivityWatch/aw-watcher-window
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
ActivityWatch/aw-watcher-window#163 · 1 comment ·
-
[macos] Swift helper never appears in the Accessibility list on its own; users must manually dig out the helper binaryPossibly taken @StreamOfRon claimed this 57 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
ActivityWatch/aw-watcher-window#123 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
ActivityWatch/aw-watcher-window#103 · 1 comment · 3 reactions ·
All issues in ActivityWatch/aw-watcher-window
Similar issues
-
bug docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ActivityWatch/docs#223 ·
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capturePossibly taken @jianyx1 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#8354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
Maintainers usually reply within 1 day
-
comp/tools P2 tool/skills type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#159541 ·
Maintainers usually reply within 1 day