feat: browser session persistence and tool improvements#187
Merged
Conversation
added 3 commits
January 27, 2026 17:42
- Add BrowserSessionManager singleton for shared browser sessions across dispatches - Add session context (previous agent summaries) to subsequent browser agents - Update PlaywrightMCPClient to support persistent user_data_dir - Add _extract_json_from_output helper for browser_evaluate parsing - Simplify check_inbox to return latest N emails without requiring filters - Update get_browser_state to show actual cookie/storage values - Add browser_click to summarization exempt tools - Fix tests for updated email tools API
- Remove unused keep_alive parameter (session manager handles persistence) - Add datetime/timezone imports and use in get_full_state() - Add detailed user_data_dir documentation in PlaywrightMCPClient - Remove unused purpose parameter from GetEmailContentTool.execute() - Update test to reflect keep_alive removal
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
This PR implements browser session persistence across multiple
dispatch_browsercalls, enabling authenticated testing workflows where auth state persists between browser agent dispatches.Key Changes
New Features
tempo/infra/browser_session.py) - Manages shared browser lifecycle with auto-recovery from crashesget_browser_statetool shows actual cookie/storage valuesImprovements
check_inboxAPI - Returns latest N emails without requiring filtersdispatch_browservsvisual_browser_taskCleanup
HeadlessBrowserTool(replaced bydispatch_browser)keep_aliveparameter (session manager handles persistence)purposeparameter fromGetEmailContentToolTesting
Files Changed