Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

install and reinstall from another session in the same daemon replace the app on a claimed device

Open
#3,345 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
ios, typescript
Domain
cli, mobile

Research direction

Start by tracing how install and reinstall use transient-exclusive claims, then compare that path with the session-store check used by open. Reproduce with two sessions sharing one daemon and a claimed iOS simulator; verify that the non-owning session gets DEVICE_IN_USE while the owning session can still install and reinstall. Check whether the other listed transient-exclusive commands have the same behavior.

Written by the indexing model from the issue text.

Description

Seen in 0.20.10, 0.21.12 and 0.21.23 on macOS with iOS simulators.

Repro

Both sessions use the default state dir, so they share one daemon, as two agents in separate worktrees of the same repo do:

agent-device open com.apple.Preferences --platform ios --udid <UDID> --session a
agent-device device status --platform ios --udid <UDID>
# live session=a

agent-device open com.apple.Preferences --platform ios --udid <UDID> --session b
# DEVICE_IN_USE: Device is already in use by session "a".   (expected)

agent-device reinstall <bundle-id> /path/to/App.app --platform ios --udid <UDID> --session b
# Installed: <bundle-id>   (session a's app is replaced)

agent-device install <bundle-id> /path/to/App.app --platform ios --udid <UDID> --session b
# Installed: <bundle-id>

When session b runs on another state dir (AGENT_DEVICE_STATE_DIR), install and reinstall fail as expected:

DEVICE_IN_USE: ios device <UDID> is owned by session "a" in workspace "<workspace>".

Cause

#1809 made install and reinstall transient-exclusive, and a claim already held by the same daemon process covers the command instead of colliding with it. That is right for the session that owns the claim, but any other session in that daemon is covered too. open is still protected by the session store check; the sessionless mutations are not.

Impact

Agents working in parallel worktrees share the default daemon, so whether an install is fenced off depends on whether each worktree happens to run its own daemon. In our case one agent's build replaced the app another agent was testing.

Expected

install and reinstall targeting a device that a different session in the same daemon holds fail with DEVICE_IN_USE, the same as open. Passing the owning --session keeps working. I only tested install and reinstall; the other transient-exclusive commands (boot, shutdown, push, prepare) may behave the same way.

Dominant language
TypeScript
Stars
4.9k
Forks
328
Avg merge
12h 18m
Merged PRs (30d)
538

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from callstack/agent-device

All issues in callstack/agent-device

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.