feat: browse handoff — headless-to-headed browser switching (v0.7.4)#201
Merged
feat: browse handoff — headless-to-headed browser switching (v0.7.4)#201
Conversation
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.
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.
Add User Handoff section to browse/SKILL.md.tmpl with usage examples. Update State Persistence TODO noting saveState/restoreState reusability.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge conflict resolution: main advanced to v0.8.1, bump handoff feature to v0.8.2. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rapidstartup
pushed a commit
to rapidstartup/gstack
that referenced
this pull request
Mar 29, 2026
…arrytan#201) * 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$B handoff "reason"opens a visible Chrome at the exact same page with all cookies and tabs.$B resumepicks up with a fresh snapshot.handoffinstead of watching the AI retry.recreateContext()refactored to sharedsaveState()/restoreState()helpers (DRY).browser.close()timeout to prevent hangs on headed browsers (macOS).Architecture
Launch-first-close-second: new headed browser starts before old headless closes. If headed launch fails, headless stays running — zero downtime. State transfer via cookies + localStorage + sessionStorage + URLs.
Eng Review
Passed — 5 issues resolved (blast radius, display detection, DRY, failure recovery, test coverage). Scope reduced from persistent profiles to browser relaunch per review recommendation.
Test Coverage
Tests: 15 new (12 unit + 3 integration)
Pre-Landing Review
No issues found.
TODOS
saveState()/restoreState()reusable, effort reduced M → S.Test plan
🤖 Generated with Claude Code