Skip to content

fix: detect already-granted Screen Recording permission after restart#23

Merged
execsumo merged 1 commit into
masterfrom
claude/screen-recording-permission-bug-mZ0vw
Jun 1, 2026
Merged

fix: detect already-granted Screen Recording permission after restart#23
execsumo merged 1 commit into
masterfrom
claude/screen-recording-permission-bug-mZ0vw

Conversation

@execsumo

Copy link
Copy Markdown
Owner

The background permission poll relied solely on CGPreflightScreenCaptureAccess(),
which on macOS 15+ can return a stale false even on a fresh launch with the
permission genuinely granted. Since the only authoritative live check ran when
the user pressed "Grant…", a permission granted in a prior session showed as
"Not Granted" after restarting the app — a regression from 0.2.0, where the poll
used the cache-bypassing SCShareableContent path (later removed because it
spammed the TCC dialog every 3s).

Add a non-prompting authoritative probe via CGWindowListCopyWindowInfo (reading
another process's window title requires Screen Recording permission) and use it
as a fallback in the poll, plus run one check immediately at launch. This never
triggers the TCC dialog, so it does not reintroduce the prompt loop.

https://claude.ai/code/session_01GZZ1aHLdxmAz4KRof5XAUC

The background permission poll relied solely on CGPreflightScreenCaptureAccess(),
which on macOS 15+ can return a stale false even on a fresh launch with the
permission genuinely granted. Since the only authoritative live check ran when
the user pressed "Grant…", a permission granted in a prior session showed as
"Not Granted" after restarting the app — a regression from 0.2.0, where the poll
used the cache-bypassing SCShareableContent path (later removed because it
spammed the TCC dialog every 3s).

Add a non-prompting authoritative probe via CGWindowListCopyWindowInfo (reading
another process's window title requires Screen Recording permission) and use it
as a fallback in the poll, plus run one check immediately at launch. This never
triggers the TCC dialog, so it does not reintroduce the prompt loop.

https://claude.ai/code/session_01GZZ1aHLdxmAz4KRof5XAUC
@execsumo
execsumo merged commit fc173ed into master Jun 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants