t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Agent command blocked by an invisible macOS privacy dialog on a headless Mac leaves the run "running" with no signal

Open nbrosei opened this issue 1 month ago • 1 comments

Before submitting

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

Area

apps/server

Steps to reproduce

  1. Run T3 Code on a Mac with nobody at the screen (headless, used remotely through the web UI).
  2. In a Claude thread, let the agent run a command that touches a macOS privacy-protected folder for the first time, e.g. ls ~/Downloads/*.html.
  3. Watch the thread from the web UI.

Expected behavior

T3 Code should tell the remote user that the command is blocked on a macOS privacy dialog (or at least that a command has been waiting for an unusually long time), and Stop should end the run.

Actual behavior

  • macOS opens a "… would like to access files in your Downloads folder" dialog on the Mac's screen. Nobody remote can see it.
  • The command item stays running with no output, and the run stays running. The thread shows no pending request and no error, so the remote user has no way to know why it stopped.
  • Messages sent to the thread wait in the queue.
  • An interrupt request had no visible effect for about a minute (the run was still running, completedAt: null).
  • Once someone dismissed the dialogs on the Mac itself, the command finished and the run resumed normally.

This is not the startup case in #5285 or the protected project folder in #5943: here the project is outside protected folders, and the agent touches a protected folder partway through a run.

Impact

Blocks work completely

Version or commit

Personal fork rebased on upstream main @ a5f92ea4b (nightly 0.0.46-nightly.20261014.3093). The fork's patches do not touch provider or run handling.

Environment

macOS 26.6.2 (headless Mac, accessed remotely), Claude provider (claude-opus-5-5), runtime mode auto

Logs or stack traces

# thread state from t3_thread_read, ~6 min after the command started
status: running   activeRunId: …:ordinal:20   pendingRequestCount: 0
item 722  command_execution  status: running  updatedAt: 04:49:29Z
  $ ls -la /private/tmp/<dir> | head; ls ~/Downloads/*.html 2>/dev/null | tail -5
item 724  run_interrupt_request                updatedAt: 04:54:48Z

Workaround

Answer the macOS dialog on the Mac itself (Screen Sharing), or grant Full Disk Access ahead of time to the process that runs the agent CLI.

Possible directions

  • Warn in the thread when a command has produced no output for N minutes on macOS, mentioning a possible privacy dialog.
  • Make Stop kill the provider's child process tree even when it is blocked.
  • Document Full Disk Access / pre-granting folder access for headless or remote Mac setups.

nbrosei avatar Oct 15 '26 05:10 nbrosei

[!NOTE] Grok responding on behalf of Julius.

Closing with a workaround: this is a macOS TCC limit, not something T3 can see. The privacy prompt is shown by the OS to the console user; the blocked process just waits in a syscall, with no output and no signal T3 could detect. For headless/remote Macs, grant Full Disk Access (System Settings → Privacy & Security) to the app or terminal that launches the provider CLI, or pre-approve the Downloads/Documents/Desktop folders once while at the Mac.

The slow interrupt may be related to #15720 (Claude waits for a running Bash command before it acts on steering).

If Stop still doesn't end the run after Full Disk Access is granted, comment with the provider log and we'll reopen.

juliusmarminge avatar Oct 15 '26 05:10 juliusmarminge