You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stim stop cannot clean up a named agent-device connection of a hosted macOS session #5604
stim stop for a hosted macOS session driven with agent-device prints:
could not clean up agent-device connection: Command failed: agent-device connection status --json
agent-device requires a named session for a leased remote connection, and stim stop does not pass one, so the connection is left open until someone runs agent-device disconnect with the session name.
Evidence
2026-11-12, a Stim Desktop test copy built and launched on a second Mac with stim macos --remote-build <mac> --remote <mac> from apps/desktop on the branch of #5576, driven with AGENT_DEVICE_MACOS_APP_BACKEND=native and a named session. stim stop stopped the hosted app and printed the line above; AGENT_DEVICE_SESSION=<name> agent-device disconnect then closed the connection.
Expected
stim stop closes the agent-device connection of the session it stops, passing the session the connection was opened under, or reports exactly which command the person should run.
Closing after #5658. The generated macOS agent command now includes a workspace session name that stim stop checks against the exact remote config before disconnecting. Stop also accepts a custom name through AGENT_DEVICE_SESSION. The PR exercised the default and custom names, a config mismatch, and failure guidance; its named status/close/disconnect sequence was checked with agent-device 0.21.36 and a local lease fixture. A live hosted Desktop run was unavailable because the mini was paused.
The remaining case is a custom connection created with a name or state directory Stim was never given. Discovering and disconnecting arbitrary agent-device sessions is out of scope; the macOS guide documents how to stop it by name with the same state directory.
Activity
janicduplessis commentedon Nov 13, 2026
Claimed: fix/5604-hosted-macos-agent-session
janicduplessis commentedon Nov 14, 2026
Closing after #5658. The generated macOS agent command now includes a workspace session name that
stim stopchecks against the exact remote config before disconnecting. Stop also accepts a custom name throughAGENT_DEVICE_SESSION. The PR exercised the default and custom names, a config mismatch, and failure guidance; its named status/close/disconnect sequence was checked with agent-device 0.21.36 and a local lease fixture. A live hosted Desktop run was unavailable because the mini was paused.The remaining case is a custom connection created with a name or state directory Stim was never given. Discovering and disconnecting arbitrary agent-device sessions is out of scope; the macOS guide documents how to stop it by name with the same state directory.