Skip to content

[Bug]: macOS: a project folder T3 Code can't read is added successfully, and the permission failure only shows up mid-turn #36423

Open

Description

@Pulsar-Programmer

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

On macOS, desktop app:

  1. Have a folder under ~/Documents, ~/Desktop, or ~/Downloads.
  2. Make sure T3 Code has no Files and Folders grant for it (deny the prompt, revoke it in System Settings → Privacy & Security → Files and Folders, or reinstall the app, which can drop the grant without a new prompt, as described in [Bug]: "turn/setPermissionMode failed" masks provider CLI startup death — macOS TCC EPERM kills both Claude and Codex when project is in a protected folder #5943).
  3. Add that folder as a project (built-in folder browser or the native picker).
  4. Start a thread in it.

Expected behavior

Adding the project fails, or warns, with a clear message that T3 Code can't read the folder and how to grant access. Nothing should look connected while it isn't.

Actual behavior

The project is added successfully. The failure only shows up later, when the agent or the file tree reads the folder and gets Operation not permitted (EPERM). With Claude and Codex this surfaces as the misleading startup errors described in #5943.

WorkspacePaths.normalizeWorkspaceRoot (apps/server/src/workspace/WorkspacePaths.ts) only stats the root and checks that it is a directory. stat succeeds on a TCC-blocked folder, so nothing on the add path tests whether the directory can actually be listed.

Impact

Major degradation or frequent failure

Version or commit

main @ 36f011d

Environment

macOS, desktop app

Logs or stack traces

Operation not permitted

Workaround

Grant T3 Code access under System Settings → Privacy & Security → Files and Folders (or Full Disk Access), then restart the app.

Notes

Related, but not the same problem:

Doing the check on the server means it is correct for remote and tunnel environments too, and on desktop it moves the macOS prompt to the moment the user picks the folder.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions