close: stop a simulator or emulator that the session's open booted
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- android, ios, typescript
- Domaine
- backend, cli, mobile-dev
Piste de recherche
Start with markSelectionBootOccurred in packages/device-selection/src/device-selection-resolver.ts to see where the boot fact is set, then trace how the session stores it and where the close path is handled in the daemon. The close help in packages/command-surface/src/management/app.ts and the shutdown policy (ADR 0029) show what else changes. Done means the daemon tests for boot-owned, pre-booted and policy-denied closes pass, and a live open-then-close leaves the device in the expected state. Resolve the open decisions with a maintainer before you start.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Purpose
Agents leave local simulators and emulators running after they finish. open boots a stopped device on its own (ensureBootedSimulator and the Android boot path), but close only stops the device with an explicit --shutdown. An overnight agent run on one host left many booted simulators behind. In that run, 42 close requests and zero close --shutdown requests were logged.
The daemon already knows when open booted the device: markSelectionBootOccurred in packages/device-selection/src/device-selection-resolver.ts sets selection.bootOccurred: true. No close or teardown path uses that fact.
The rule is "leave the device as you found it". If a session's open booted a local simulator or emulator, close stops it. If the device was already running, close leaves it running.
Required behavior
- The session records whether its
openbooted the local virtual device. Provider and physical targets never record a boot (this matchesmarkSelectionBootOccurred). - If the session booted the device, plain
closestops it through the same shutdown capability asclose --shutdown. This applies to every local simulator and emulator: iOS, tvOS, visionOS, watchOS, and Android. - If the device was already booted before
open, plaincloseleaves it running. This is the current behavior. close --shutdownkeeps its current meaning: it always stops a local simulator or emulator.- Daemon policy that denies
device-shutdown(ADR 0029) also blocks the implicit stop. In that caseclosesucceeds and reports that the device was kept running. - The
closeresponse reports the implicit stop indata.shutdown, the same as an explicit--shutdown. - A boot-owned device does not keep a warm iOS runner after
close, because the device stops.
Open decisions
- Should there be an opt-out for an agent that booted a device and wants it to stay up (for example
close --keep-device)? A new flag followsdocs/agents/cli-flags.md. - Should graceful daemon shutdown, or session idle expiry, also stop devices that its sessions booted? That would cover agents that never call
close.
Completion conditions
- Daemon tests: a session that booted a simulator or emulator stops it on plain
close. A session on a device that was already booted does not stop it. Policy denial keeps the device running andclosestill succeeds. - Live check on a stopped iOS simulator and a stopped Android emulator:
openthenclose, and the device ends shut down. With a pre-booted device, it ends booted. - Update the help and docs to describe the new default:
closehelp inpackages/command-surface/src/management/app.ts, the lifecycle facts andworkflow/manual-qa/validatetopics insrc/commands/schema/cli-help*.ts,website/docs/docs/sessions.md, and the skills. The interim instructions that tell agents to add--shutdowncan then become plainclose. - Changelog/release note entry for 0.22, because the default changes.
- Langage dominant
- TypeScript
- Étoiles
- 5.3k
- Forks
- 377
- Merge moyen
- 14 h 6 min
- PR mergées (30 j)
- 650
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de callstack/agent-device
-
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
callstack/agent-device#4249 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug ready-for-agent
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
callstack/agent-device#4212 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed readPeut-être pris @pcbeingused333 l’a pris il y a 6 jours. Ouvertebug ready-for-agent
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
callstack/agent-device#4018 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
callstack/agent-device#1869 ·
Les mainteneurs répondent en général sous 1 jour
-
bug ready-for-agent
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
callstack/agent-device#4247 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de callstack/agent-device
Issues similaires
-
Navbar avatar and name stay stale after saving profile changesPeut-être pris @alexechoi l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
marmelab/atomic-crm#416 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
epam/ai-dial-react-file-manager#99 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
canonical/craft-actions#146 ·
Les mainteneurs répondent en général sous 2 jours
-
feature-request
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
bluesky-social/social-app#12343 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
lucide-icons/lucide#5165 ·
Les mainteneurs répondent en général sous 1 jour