Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MagMueller
Copy link
Collaborator

@MagMueller MagMueller commented Sep 6, 2025

Auto-generated PR for: enable StorageStateWatchdog if user_data_dir provided


Summary by cubic

Enable StorageStateWatchdog when storage_state or user_data_dir is set, so sessions with persistence configured save storage on shutdown with safe defaults. Adds clear debug logs to show when it’s enabled.

  • New Features
    • Automatically attaches StorageStateWatchdog if storage_state or user_data_dir is provided.
    • Uses conservative defaults: auto_save_interval=60s and save_on_change=false (saves on shutdown).
    • Adds debug messages showing enable/disable status and which options triggered it.

Copy link

github-actions bot commented Sep 6, 2025

Agent Task Evaluation Results: 2/4 (50%)

View detailed results
Task Result Reason
amazon_laptop ✅ Pass The agent successfully navigated to amazon.com, searched for 'laptop', and returned the name of the first laptop result along with additional relevant details such as price, rating, number of reviews, and product URL. This meets all the criteria specified for the task.
google_maps_3d ❌ Fail The agent correctly searched for ETH Zurich Hauptgebäude on www.google.com/maps and closed the side panel. It also enabled Satellite View as required. However, the agent reported that the 3D view was disabled and thus did not enable it, which does not meet the criteria of correctly clicking the 3D button to enable 3D mode. Therefore, the task was not fully completed as specified.
browser_use_pip ❌ Fail The agent did not provide the required pip installation command 'pip install browser-use'. Instead, it described a custom installation process using a tool called UV and Playwright commands. Therefore, the output does not meet the success criteria.
captcha_cloudflare ✅ Pass The agent successfully solved the captcha on the specified page, clicked the 'Check' button, waited for completion, and extracted the hostname value 'example.com' as required. All criteria for success were met.

Check the evaluate-tasks job for detailed task execution logs.

@MagMueller MagMueller merged commit 27ead3a into main Sep 6, 2025
11 checks passed
@MagMueller MagMueller deleted the enable-storagestatewatchdog-if-userdatadir-provided branch September 6, 2025 20:19
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

# Initialize StorageStateWatchdog conditionally
# Enable when user provides either storage_state or user_data_dir (indicating they want persistence)
should_enable_storage_state = (
self.browser_profile.storage_state is not None or self.browser_profile.user_data_dir is not None
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Sep 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling the watchdog when only user_data_dir is set starts monitoring but cannot save/load without a storage_state path, adding overhead without effect. Consider deriving a default path from user_data_dir or gating enablement on storage_state.

Prompt for AI agents
Address the following comment on browser_use/browser/session.py at line 1003:

<comment>Enabling the watchdog when only user_data_dir is set starts monitoring but cannot save/load without a storage_state path, adding overhead without effect. Consider deriving a default path from user_data_dir or gating enablement on storage_state.</comment>

<file context>
@@ -997,14 +997,27 @@ async def attach_all_watchdogs(self) -&gt; None:
+		# Initialize StorageStateWatchdog conditionally
+		# Enable when user provides either storage_state or user_data_dir (indicating they want persistence)
+		should_enable_storage_state = (
+			self.browser_profile.storage_state is not None or self.browser_profile.user_data_dir is not None
+		)
+
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant