mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-20 11:52:20 +02:00
fix(pair-agent): one-way-door consent question before a daemon relaunch (template half)
The skill flow now checks daemon liveness before Step 4 and asks an explicit one-way-door question (tabs/cookies/logins are lost) before passing --force-restart — never proceeding on a vague reply. Pairs with the CLI-half commit that stopped pair-agent auto-killing live daemons. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
879beb984e
commit
423a963d22
@@ -107,6 +107,31 @@ Options:
|
|||||||
|
|
||||||
## Step 4: Execute pairing
|
## Step 4: Execute pairing
|
||||||
|
|
||||||
|
**Live-daemon consent (one-way door).** Pairing can relaunch the browser
|
||||||
|
daemon; a relaunch KILLS the running headless daemon — open tabs, cookies,
|
||||||
|
and logged-in sessions die with it. The CLI honors the iron rule (only an
|
||||||
|
explicit `--force-restart` may kill a live daemon), so check first:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$B status 2>/dev/null | head -5
|
||||||
|
```
|
||||||
|
|
||||||
|
If a daemon is running, ask via AskUserQuestion (one-way door — lost
|
||||||
|
tabs/cookies/logins cannot be recovered):
|
||||||
|
|
||||||
|
> "A headless browser daemon is live (tabs and logins may be active). Pairing
|
||||||
|
> headed requires relaunching it — everything in the current daemon is lost.
|
||||||
|
>
|
||||||
|
> RECOMMENDATION: Choose B unless the remote agent specifically needs a
|
||||||
|
> visible browser window; pairing works against the existing daemon."
|
||||||
|
|
||||||
|
Options:
|
||||||
|
- A) Relaunch (pass `--force-restart`; current tabs/cookies/logins are lost)
|
||||||
|
- B) Keep the live daemon (recommended — pair against it as-is)
|
||||||
|
|
||||||
|
Only pass `--force-restart` to the commands below after an explicit A. Never
|
||||||
|
default to A on a vague reply — this is a destructive confirmation.
|
||||||
|
|
||||||
### If same machine (option A):
|
### If same machine (option A):
|
||||||
|
|
||||||
Run pair-agent with --local flag:
|
Run pair-agent with --local flag:
|
||||||
|
|||||||
Reference in New Issue
Block a user