You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: browse handoff — headless-to-headed browser switching
Add `handoff` and `resume` commands that let users take over a visible
Chrome when the headless browser gets stuck (CAPTCHAs, auth walls, MFA).
Architecture: launch-first-close-second for safe rollback. State transfer
via extracted saveState()/restoreState() helpers (DRY with recreateContext).
Auto-handoff hint after 3 consecutive command failures.
* test: handoff unit + integration tests (15 tests)
Covers saveState/restoreState, failure tracking, edge cases (already
headed, resume without handoff), and full integration flow with cookie
and tab preservation across headless-to-headed switch.
* docs: handoff section in browse template + TODOS update
Add User Handoff section to browse/SKILL.md.tmpl with usage examples.
Update State Persistence TODO noting saveState/restoreState reusability.
* chore: bump version and changelog (v0.7.4)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,18 @@
1
1
# Changelog
2
2
3
+
## [0.8.2] - 2026-03-19
4
+
5
+
### Added
6
+
7
+
-**Hand off to a real Chrome when the headless browser gets stuck.** Hit a CAPTCHA, auth wall, or MFA prompt? Run `$B handoff "reason"` and a visible Chrome opens at the exact same page with all your cookies and tabs intact. Solve the problem, tell Claude you're done, and `$B resume` picks up right where you left off with a fresh snapshot.
8
+
-**Auto-handoff hint after 3 consecutive failures.** If the browse tool fails 3 times in a row, it suggests using `handoff` — so you don't waste time watching the AI retry a CAPTCHA.
9
+
-**15 new tests for the handoff feature.** Unit tests for state save/restore, failure tracking, edge cases, plus integration tests for the full headless-to-headed flow with cookie and tab preservation.
10
+
11
+
### Changed
12
+
13
+
-`recreateContext()` refactored to use shared `saveState()`/`restoreState()` helpers — same behavior, less code, ready for future state persistence features.
14
+
-`browser.close()` now has a 5-second timeout to prevent hangs when closing headed browsers on macOS.
Copy file name to clipboardExpand all lines: TODOS.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,9 @@
52
52
53
53
**Why:** Enables "resume where I left off" for QA sessions and repeatable auth states.
54
54
55
-
**Effort:** M
55
+
**Context:** The `saveState()`/`restoreState()` helpers from the handoff feature (browser-manager.ts) already capture cookies + localStorage + sessionStorage + URLs. Adding file I/O on top is ~20 lines.
After `$B screenshot`, `$B snapshot -a -o`, or `$B responsive`, always use the Read tool on the output PNG(s) so the user can see them. Without this, screenshots are invisible.
261
261
262
+
## User Handoff
263
+
264
+
When you hit something you can't handle in headless mode (CAPTCHA, complex auth, multi-factor
265
+
login), hand off to the user:
266
+
267
+
```bash
268
+
# 1. Open a visible Chrome at the current page
269
+
$B handoff "Stuck on CAPTCHA at login page"
270
+
271
+
# 2. Tell the user what happened (via AskUserQuestion)
272
+
# "I've opened Chrome at the login page. Please solve the CAPTCHA
273
+
# and let me know when you're done."
274
+
275
+
# 3. When user says "done", re-snapshot and continue
After `$B screenshot`, `$B snapshot -a -o`, or`$B responsive`, always use the Read tool on the output PNG(s) so the user can see them. Without this, screenshots are invisible.
108
108
109
+
## User Handoff
110
+
111
+
When you hit something you can't handle in headless mode (CAPTCHA, complex auth, multi-factor
112
+
login), hand off to the user:
113
+
114
+
```bash
115
+
# 1. Open a visible Chrome at the current page
116
+
$B handoff "Stuck on CAPTCHA at login page"
117
+
118
+
# 2. Tell the user what happened (via AskUserQuestion)
119
+
# "I've opened Chrome at the login page. Please solve the CAPTCHA
120
+
# and let me know when you're done."
121
+
122
+
# 3. When user says "done", re-snapshot and continue
0 commit comments