Boot Chrome on demand instead of keeping it always running#19
Merged
Conversation
LinkedIn tool calls now ping the CDP endpoint before attaching and, if Chrome isn't up, launch it via bin/browser-service start and wait for CDP to come up. Session cookies persist on disk in the Chrome profile, so this is safe — no need for launchd/systemd to keep Chrome alive between calls anymore. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…mand Chrome no longer needs to stay running between calls, so probe_browser reporting it down is the expected steady state, not an incident — drop the startup warning log and the stale "reinstall the always-on service" restart hint from status output. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Update the unit test to match cron/system_status.py's new behavior: Chrome down no longer logs a warning, and restart_hint was replaced by starts_on_demand. Co-Authored-By: Claude Sonnet 5 <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
outreach/browser.pynow check the CDP endpoint before attaching, and lazily launch Chrome viabin/browser-service start(waiting for CDP) if it's not already up.KeepAliveservice on the local machine — no longer needed since the browser wakes on demand.bin/browser-service installis still there if anyone wants auto-start-at-login back.--user-data-dirprofile, independent of whether the process is running.Test plan
bin/browser-service uninstall, confirmedcdp_running=no)LinkedInBrowser(mode="attach")call with no Chrome running — confirmed it launched Chrome, attached, andis_logged_in()returnedTrue🤖 Generated with Claude Code