agent-device daemon survives graceful Quit under the T3 app executable#33552

opened1d agoby11kuna

Title: agent-device daemon survives graceful Quit under the T3 app executable

Problem: On macOS, T3's agent-device daemon was observed alive for nine days and remained running after a graceful T3 quit. It uses the desktop application's executable as its Node runtime, so a process-based wait for T3 to exit never completes even after the desktop quits.

Reproduction or observation: The retained observation identified the helper by its generic command structure:

…/T3 Code (Beta).app/Contents/MacOS/T3 Code (Beta) …/agent-device/…/daemon.js

After graceful Quit, that daemon remained. Nine days is its observed uptime, not a measured duration spent orphaned after Quit. The exact T3 build and agent-device version were not recorded in the supplied observation. This report does not claim a fresh reproduction on current main.

Suggested verification: use T3's local device integration to start its helper, record which helper is owned by that application instance, quit the desktop gracefully, and check whether that helper exits and whether a wait for that instance's processes can finish. Do this with no unrelated active device work.

Proposed behavior: Stop an app-owned agent-device daemon during graceful application shutdown. If it is intentionally persistent or shared, give it a distinct process identity/helper bundle and document its owner and shutdown lifecycle, so it is distinguishable from the desktop process. A separate helper name improves exit detection but does not itself resolve an unintended lifecycle leak.

Why native: T3 launches the helper and chooses the executable and ownership lifecycle. Process-name-based cleanup outside T3 cannot safely distinguish an app-owned leftover from a legitimately shared device service.

Related but different: #17470 concerns stale device claims while T3 remains running; #16614 concerns Device Hub capture retention and CPU; #22983 concerns a surviving backend and home lock. The older gh/claude helper leak in #12507 was fixed by #12513, but that does not establish an agent-device shutdown fix.