macOS: apps launched from integrated terminal can't request TCC permissions (mic, camera)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Problem
When running an app that needs microphone or camera access from T3 Code's integrated terminal, macOS never shows the permission prompt — it silently fails. The same app works fine when launched from a standalone terminal (e.g. Ghostty).
This affects both dev and production builds.
Cause
macOS TCC requires two things to show privacy permission prompts for child processes:
- A valid code signature on the parent app bundle
- Usage description keys in the app's
Info.plist(e.g.NSMicrophoneUsageDescription)
Dev builds
The dev launcher (apps/desktop/scripts/electron-launcher.mjs) patches the Electron app bundle's Info.plist (display name, bundle ID, icon) but doesn't re-sign the bundle afterward. This invalidates the existing code signature, so TCC silently denies all permission prompts for child processes.
Production builds
The mac build config in scripts/build-desktop-artifact.ts has two issues:
- No usage description keys —
NSMicrophoneUsageDescription,NSCameraUsageDescription, etc. are not included in the macextendInfo, so macOS doesn't know the app needs those permissions. - Unsigned builds have no signature at all —
CSC_IDENTITY_AUTO_DISCOVERYis set to"false"for all unsigned builds, which disables signing entirely. Without even an ad-hoc signature, TCC can't attribute permissions to the app.
Suggested fix
Dev (~11 lines, 1 file)
Ad-hoc re-sign the app bundle after patching plists in electron-launcher.mjs:
spawnSync("codesign", ["--force", "--deep", "--sign", "-", appBundlePath]);
I've tested this locally and it resolves the issue for dev.
Prod
- Add
NSMicrophoneUsageDescriptionandNSCameraUsageDescriptionto the mac build config viaextendInfo. - For unsigned mac builds, use ad-hoc signing (
identity: "-") instead of disabling signing entirely.
I haven't been able to test the prod fix locally (no signing setup), but the approach matches Apple's TCC documentation.
Reproduction
- Open a project in T3 Code (desktop, macOS)
- In the integrated terminal, run any app that requests microphone or camera access
- No permission prompt appears; the app fails silently
- Run the same command in an external terminal — it works
PR
I created a PR, but I think it was auto closed.
Contributor guide
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.
Research direction
Start with apps/desktop/scripts/electron-launcher.mjs and scripts/build-desktop-artifact.ts, then review the dev bundle plist patching and mac build configuration described in the issue. Reproduce the microphone or camera case on macOS for both dev and production builds. Done means apps launched from the integrated terminal receive the expected TCC permission prompts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, macos, typescript
- Domain
- build-system, desktop, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100