Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Let a script hold a device claim while it runs simctl install or simctl launch itself

Ouverte
#3,263 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@thymikee y travaille déjà.

Depuis le 16/10/2026.

  • #3738 par @thymikee — ouverte

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
38/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
ios, typescript
Domaine
cli, mobile-dev

Piste de recherche

Start by reading the CLI implementations of install, boot and shutdown to understand how they take and release transient-exclusive claims, then compare that with the open/close session lifecycle. Decide which of the three proposed approaches best fits the stated requirement; done means a script can hold a claim while its simulator mutation runs, and the claim is released when that work ends without the unwanted session side effects.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement

Seen in 0.21.15, macOS, iOS simulators.

Problem

Our dev scripts install and relaunch a dev client on an iOS simulator with xcrun simctl install and xcrun simctl launch --terminate-running-process. Before each call, they read the claim file in ~/.agent-device/device-claims/ and refuse when another session holds the device.

Between that check and the simctl call, an agent-device client (an e2e run, or an IDE device panel) can take the claim. The install or relaunch then interrupts that session. The window is short, but a check that only our scripts honor cannot close it. The claim must come from agent-device.

What exists in 0.21.15, and why it does not fit

  • device status|release only inspects or releases claims. No command takes one.
  • install, boot and shutdown take a transient-exclusive claim, but only for their own work. agent-device cannot run our simctl command under that claim.
  • open --session S --platform ios --udid U with no app holds a session claim until close --session S. As a reservation, it has these side effects:
    • it starts a daemon in the state dir;
    • keepHot can start xcodebuild build-for-testing for the runner in the background;
    • on a simulator that is not booted, it boots it and runs open -a Simulator;
    • if the script crashes before close, the claim stays held while the daemon lives.
  • takeover needs a remote lease, so it does not apply to a local simulator.

Proposal (any one is enough)

  1. agent-device exec --platform ios --udid U -- <command...>: take a transient-exclusive claim, run the child, and release the claim when the child exits. The claim owner is the exec process, so a crash of the child or of agent-device frees the claim.
  2. agent-device device claim --udid U and device release --udid U --session S: take a claim whose owner is the calling process (or one with a TTL or heartbeat). No daemon, no boot, no runner prewarm, no session record.
  3. open --claim-only: the current open with no app, but without the boot, open -a Simulator and runner prewarm.

Option 1 fits our use best. The claim lasts exactly as long as the mutation, and nothing leaks.

Current workaround

We read the claim file right before each simctl call. That narrows the window but does not close it.

Related: #2161 (workspace-scoped device pinning).

Langage dominant
TypeScript
Étoiles
5k
Forks
334
Merge moyen
12 h 2 min
PR mergées (30 j)
678

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de callstack/agent-device

Toutes les issues de callstack/agent-device

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.