Add persistent browser sessions for interactive browsing#64
Open
Add persistent browser sessions for interactive browsing#64
Conversation
Introduces a browser session system that allows agents to open, interact with, and close persistent browser sessions. Sessions stay alive between tool calls, enabling multi-step workflows like logging in, navigating, filling forms, and extracting content. New tools: browser_open, browser_action, browser_snapshot, browser_list_sessions, browser_close. Replaces the fixed 10s page load timer with document.readyState polling + network settle heuristic. Inspired by vercel-labs/agent-browser's snapshot+ref paradigm, adapted to codey's in-process Rust architecture (no daemon, no IPC). https://claude.ai/code/session_01QvEcr1eaxtqwA2Ry5DGwhp
Replaces the duplicate browser launch/wait/extract logic in fetch_html with calls to session::launch_browser and session::extract_page_content. Deletes fetch_with_browser entirely. fetch_html is now a thin wrapper: launch → extract → tear down, using the same code path as persistent browser sessions. https://claude.ai/code/session_01QvEcr1eaxtqwA2Ry5DGwhp
Rebase onto main to pick up record_correction tool, declarative block macros (define_tool_block!/define_simple_tool_block!), layered cancel, and configurable agent name. Converts all 5 browser session blocks from manual boilerplate to the new macro conventions. BrowserOpenBlock uses define_tool_block! (with params_type + agent label), the rest use define_simple_tool_block!. https://claude.ai/code/session_01QvEcr1eaxtqwA2Ry5DGwhp
b41e2b7 to
8c77886
Compare
- Add BrowserAction::parse() for action string + JSON params validation - Add SessionResult::format() for consistent LLM output formatting - Add BrowserSessionManager::action_from_raw() as the high-level API - Add BrowserSessionManager::format_list() for list output - Slim app.rs effect handlers to clean one-liner match arms https://claude.ai/code/session_01QvEcr1eaxtqwA2Ry5DGwhp
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.
Introduces a browser session system that allows agents to open, interact
with, and close persistent browser sessions. Sessions stay alive between
tool calls, enabling multi-step workflows like logging in, navigating,
filling forms, and extracting content.
New tools: browser_open, browser_action, browser_snapshot,
browser_list_sessions, browser_close. Replaces the fixed 10s page load
timer with document.readyState polling + network settle heuristic.
Inspired by vercel-labs/agent-browser's snapshot+ref paradigm, adapted
to codey's in-process Rust architecture (no daemon, no IPC).
https://claude.ai/code/session_01QvEcr1eaxtqwA2Ry5DGwhp