Skip to content

Commit 17bca1d

Browse files
committed
Update agent-device skill docs for open --relaunch
1 parent b8cc9f7 commit 17bca1d

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

skills/agent-device/SKILL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ agent-device boot # Ensure target is booted/ready without openin
4242
agent-device boot --platform ios # Boot iOS simulator
4343
agent-device boot --platform android # Boot Android emulator/device target
4444
agent-device open [app] # Boot device/simulator; optionally launch app
45+
agent-device open [app] --relaunch # Terminate app process first, then launch (fresh runtime)
4546
agent-device open [app] --activity com.example/.MainActivity # Android: open specific activity
4647
agent-device close [app] # Close app or just end session
4748
agent-device reinstall <app> <path> # Uninstall + install app in one command
@@ -134,7 +135,7 @@ agent-device screenshot out.png
134135
### Deterministic replay and updating
135136

136137
```bash
137-
agent-device open App --save-script # Save session script (.ad) on close
138+
agent-device open App --relaunch --save-script # Record fresh-launch semantics in .ad script
138139
agent-device replay ./session.ad # Run deterministic replay from .ad script
139140
agent-device replay -u ./session.ad # Update selector drift and rewrite .ad script in place
140141
```
@@ -169,6 +170,7 @@ agent-device apps --platform android --user-installed
169170
- On iOS, `xctest` is the default and does not require Accessibility permission.
170171
- If XCTest returns 0 nodes (foreground app changed), agent-device falls back to AX when available.
171172
- `open <app>` can be used within an existing session to switch apps and update the session bundle id.
173+
- Use `open <app> --relaunch` during React Native/Fast Refresh debugging when you need a fresh app process without ending the session.
172174
- If AX returns the Simulator window or empty tree, restart Simulator or use `--backend xctest`.
173175
- Use `--session <name>` for parallel sessions; avoid device contention.
174176
- Use `--activity <component>` on Android to launch a specific activity (e.g. TV apps with LEANBACK).

skills/agent-device/references/session-management.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Sessions isolate device context. A device can only be held by one session at a t
1414
- Name sessions semantically.
1515
- Close sessions when done.
1616
- Use separate sessions for parallel work.
17+
- For dev loops where runtime state can persist (for example React Native Fast Refresh), use `open <app> --relaunch` to restart the app process in the same session.
1718
- For deterministic replay scripts, prefer selector-based actions and assertions.
1819
- Use `replay -u` to update selector drift during maintenance.
1920

0 commit comments

Comments
 (0)