fix: update examples to use clientStarter and fix BrowserSandbox lazy init#101
Merged
chickenlj merged 2 commits intoagentscope-ai:mainfrom May 7, 2026
Conversation
… init - Rename clientConfig to clientStarter in ManagerConfig.builder() calls across all examples to match the refactored API (commit 12b25af) - Add browserSandbox.getInfo() before getDesktopUrl() to trigger lazy initialization, preventing 'Sandbox null is not healthy' error - Fix typo in SandboxStructuredExample: 'agent-sessopn' -> 'agent-session' Affected examples: - simple_sandbox_tool_example - structured_sandbox_tool_example - custom_sandbox_example - browser_use_fullstack_runtime Change-Id: I984405de32f5e4325253614204a2df0092cd8611 Co-developed-by: Qoder <noreply@qoder.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
Fix compilation errors and runtime exceptions in example projects caused by the sandbox module refactoring (commit 12b25af).
Changes
1. Rename
clientConfig→clientStarter(4 files)The
ManagerConfig.builder()method was renamed from.clientConfig()to.clientStarter()in the core module, but the examples were not updated accordingly.Affected files:
simple_sandbox_tool_example/AgentConfig.javastructured_sandbox_tool_example/SandboxStructuredExample.javacustom_sandbox_example/Main.javabrowser_use_fullstack_runtime/BrowserAgentApplication.java2. Fix BrowserSandbox lazy initialization (2 files)
BrowserSandbox.getDesktopUrl()callsGuiMixin.getDesktopUrl()which directly invokesmanagerApi.getInfo()bypassing the lazy initialization inSandbox.getInfo(). This causes aRuntimeException: Sandbox null is not healthywhen the container hasn't been created yet.Fix: Add
browserSandbox.getInfo()beforegetDesktopUrl()to trigger container creation.3. Fix typo
agent-sessopn→agent-sessioninSandboxStructuredExample.javaTesting
simple_sandbox_tool_example: Spring Boot started, Docker container created, VNC URL accessiblebrowser_use_fullstack_runtime: Spring Boot started on port 8080custom_sandbox_example: SandboxService started and exited normally