From 423a963d2237c3f4e7caf0116e817706525a5843 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Mon, 17 Aug 2026 10:53:36 -0700 Subject: [PATCH] fix(pair-agent): one-way-door consent question before a daemon relaunch (template half) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pair-agent/SKILL.md.tmpl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pair-agent/SKILL.md.tmpl b/pair-agent/SKILL.md.tmpl index 3b18af56c..31e5d4f46 100644 --- a/pair-agent/SKILL.md.tmpl +++ b/pair-agent/SKILL.md.tmpl @@ -107,6 +107,31 @@ Options: ## 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): Run pair-agent with --local flag: