An agent run on a Mac driven remotely through a web UI grinds to a halt mid-command. The command item stays running with no output. The thread shows no pending request and no error. Messages queue behind it, and an interrupt request has no visible effect for the best part of a minute. Dismiss the dialogs on the Mac itself and everything resumes as if nothing happened. This is pingdotgg/t3code#19776.
Why it happens
The first time a process touches a privacy-protected folder - Downloads, Documents, Desktop - macOS raises a consent dialog. The dialog goes to the console user, on the physical screen. A remote session never sees it. The blocked process just waits in a syscall, so there is no output, no error and no signal a remote client could detect. The automation stack looks wedged when it is actually parked behind a prompt nobody can see.
What to do
Grant Full Disk Access under System Settings, Privacy and Security to the app or terminal that launches the agent CLI, or pre-approve the Downloads, Documents and Desktop folders once while you are at the Mac. Both stop the prompt appearing during a headless session. Full Disk Access is the more future-proof of the two, since it covers protected folders the agent has not reached yet.
If a remote Mac run ever sits at "running" with zero output, suspect a TCC prompt first. The stuck point is usually a folder the agent touched for the first time, and no amount of retrying from the remote side will clear it. The sluggish interrupt is the same trap - the run cannot act on a stop request while the process is parked in the syscall.