Skip to content

Hosted macOS agent control: stim stop leaves agent-device bound to the old remote config, and host session dirs pile up #2522

Description

@janicduplessis

Problem

From the two-Mac e2e of the agent-device macos-app lease (#2477, results in issuecomment-6001026253):

  • After stim stop of a hosted macOS app, the client's local agent-device session stays bound to that app's remote config. The next hosted workspace's --remote-config fails with "A different remote connection is already active" until agent-device disconnect is run by hand.
  • On the host, ~/.stim/server/agent-device/sessions/stim.<session>_default directories stay behind after every hosted session.

Expected

  • stim stop / worktree remove for a hosted macOS app also ends the client's agent-device connection for that remote config (agent-device close + disconnect for that config only), or the guide states the exact commands agents run before stopping. The guide's agent section covers it either way.
  • stim-server removes a hosted session's agent-device session directory when the session stops (it owns ~/.stim/server).

Activity

  1. janicduplessis commented on Oct 5, 2026

    @janicduplessis
    CollaboratorAuthor

    Claimed: fix/2522-agent-device-cleanup

  2. janicduplessis commented on Oct 5, 2026

    @janicduplessis
    CollaboratorAuthor

    Fixed in #2527 (acbf044). Verified on the Mac mini after redeploying stim-server from that commit: the hosted session's agent-device session directory exists before stop and is gone after; stim stop ends the client's agent-device connection (connection status reports connected: false), and a second workspace hosted and drove its app without a manual disconnect.

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