[Bug] [ZCode] macOS TCC prompts for unrelated home folders (iCloud Drive, Documents) on launch
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
问题类别 · Category: 文件 / 项目操作 · File / Project ops
涉及框架 · Framework: 不涉及框架 · Not framework-specific
严重程度 · Severity: 影响体验 · Major (功能可用但体验受损 / works but degraded)
复现频率 · Reproducibility: 必现 · Always
问题描述 · Description
On a fresh launch (and sometimes during normal use), the ZCode desktop app triggers macOS TCC (Transparency, Consent, and Control) access prompts for folders under the user's home directory that have nothing to do with the open workspace or the current task — notably iCloud Drive (~/Library/Mobile Documents) and Documents (~/Documents).
The user is shown the standard macOS dialog:
"“ZCode” wants to access files in your "Documents" folder." / "...iCloud Drive..."
There is no apparent reason for the app to touch these locations: no workspace is rooted there, no file picker was opened, and no task referenced them. This looks like the app (or the agent) proactively scanning/indexing broad parts of the home directory rather than staying within the user-selected workspace.
This is concerning both as a UX annoyance (surprising permission prompts on first run) and as a privacy/trust issue — users reasonably expect a coding agent to only access the project folder they explicitly opened.
复现步骤 · Steps to reproduce
- Install ZCode 3.7.5 on macOS (repro on macOS 26.5).
- Either do a clean first launch, or revoke TCC access for ZCode in System Settings → Privacy & Security → Files and Folders (and Full Disk Access) and relaunch.
- Open a workspace/project that lives outside of
~/Documentsand outside of iCloud Drive (e.g.~/Projects/foo). - Do not open any file picker; just let the app sit, or run a trivial task confined to the workspace.
- Observe macOS popping TCC prompts asking to grant ZCode access to Documents and/or iCloud Drive.
期望表现 · Expected behavior
ZCode should only access:
- the explicitly-opened workspace folder, and
- paths the user actively selects via a file picker / grants per-task.
It should not request broad access to unrelated home-directory locations (Documents, iCloud Drive, Desktop, Downloads, etc.) unless the user opens a file there. No surprise TCC prompts on launch for folders unrelated to the workspace.
实际表现 · Actual behavior
ZCode requests macOS file-access permission for ~/Documents and ~/Library/Mobile Documents (iCloud Drive) — and potentially other home subfolders — without any user action targeting them. Prompts reappear after TCC access is revoked, confirming it's the app actively attempting to read those paths rather than a one-off.
ZCode 版本 · ZCode version
v3.7.5 (build 3.7.5.4641), bundle id dev.zcode.app
设备 / 系统 · Device / OS
macOS 26.5 (Build 25F84), ZCode desktop app
截图 / 录屏 / 日志 · Screenshots / Recordings / Logs
Reproducible via tccutil reset:
tccutil reset dev.zcode.app
# relaunch ZCode → TCC prompts for Documents / iCloud Drive reappear
Happy to attach a screen recording of the prompt on request.
补充材料 · Additional context
- Suggestion: restrict home-directory traversal to the open workspace by default; gate any broader access behind an explicit user action (file picker) or an opt-in setting.
- Related to the permission-UX family of issues (#242, #243, #256): ZCode reaches for resources outside what the user intended, and the surrounding UX doesn't make that legible.
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 at the ZCode desktop app launch path and reproduce the behavior with tccutil reset dev.zcode.app, using a workspace outside Documents and iCloud Drive. Trace which launch or task activity accesses ~/Documents and ~/Library/Mobile Documents; done means access stays within the opened workspace or an explicitly selected path and unrelated TCC prompts no longer appear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- desktop, operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100