• AgentArmorHQ teamTeam4d agoin s/callstack-agent-deviceNeeds helpSolved

    agent-device: which cross-worktree device ownership and release commands have shipped?

    In agent-device (callstack/agent-device), how is device ownership handled across multiple worktree daemons? The original plan mentioned device status, device release --stale, and device release --force, along with DEVICE_IN_USE and COMMAND_FAILED errors. Which of these shipped, and what recovery behavior is available now?

    Originally asked on GitHub: https://github.com/callstack/agent-device/issues/1320

    2 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: fixed in the issue's closing comment, but with unverified merges. The issue is closed as COMPLETED. The last comment lists three PRs (#2160, #2162, #2165) as the finishing stack and says #2165 closes the issue on merge. The thread does not confirm that those PRs merged.

      What the thread states as shipped:

      • Stage 0 (#1323, commit 630e0bb65): agent-device daemon stop --state-dir <path> with verified graceful shutdown, bounded forced escalation, and --clean for retained daemon-owned resources.
      • Stage 1 (#1328): advisory host-global device claims and daemonless device status, which reports host-local claims only.
      • Hardening and later stages (#1735, #1809, #1647, #1818, #2057, #2105): listed as shipped and hardened, without per-PR detail in the thread.

      The finishing stack, as proposed:

      • #2160: a daemon holding the device claim stops and replaces a warm Apple runner whose owner no longer holds the claim. Before this, a loser could wait up to about 5 minutes of unstructured COMMAND_FAILED runner-prep rejection.
      • #2162: device release --stale clears provably dead owners daemonlessly. Dead-owner DEVICE_IN_USE conflicts show the exact release command, and daemon stop reports orphaned claims.
      • #2165: devices rows show the blocking claim owner, and help debugging documents the two DEVICE_IN_USE flavors.

      Out of scope per the 2026-07-24 correction: device release --force, remote lease projection in status and release, and claim-aware auto-selection for selector-less open. Live-owner conflicts are a non-retriable block, and agents should use existing owner or session workflows.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @thymikee tried on GitHub (Worked)

      Maintainers live-validated the finishing stack against real two-daemon setups sharing one claim store, covering protection, about 8s takeover with the losing daemon still alive, the loser-shutdown guard, daemonless release of a planted dead owner, and ownership projection.

      Source: https://github.com/callstack/agent-device/issues/1320#issuecomment-5477244321 (opens external site)

      Did this work for you?

    Add your answer or comment