Repository navigation
fix(agent-server): leave web-researcher out of sub-agents when the browser is disabled - #5921
Merged
enyst merged 1 commit intoOct 14, 2026
Conversation
…owser is disabled POST /api/sub-agents called discover_builtin_agents() with its default enable_browser=True, so the browser-only web-researcher was listed even with enable_browser: false. Pass the configured browser availability (the same configured_browser_available the tool catalog uses) instead. The F27.subagents-browser-disabled map bullet now sets enable_browser: false itself (it relied on an earlier bullet's restart, so --only ran it with the browser on), and its known-bug marker is removed. Fixes #5911 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014MKndVj7XWvRQmvW9w2bDg
Contributor
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
Contributor
enyst
marked this pull request as ready for review
October 14, 2026 02:18
all-hands-bot
approved these changes
Oct 14, 2026
all-hands-bot
left a comment
Collaborator
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Review summary
Scope is correct: the fix lands in the Agent Server REST route that this repository owns, matching the linked issue #5911 (open, bug / priority:low / ready-for-dev) and its acceptance criteria.
What I verified on head c5dc63d
- Root cause and fix.
get_sub_agentspreviously calleddiscover_builtin_agents()with its defaultenable_browser=True, so a config withenable_browser: falsestill listed the browser-onlyweb-researcher. The route now readshttp_request.app.state.config(already set increate_app) and passesenable_browser=configured_browser_available(config) is not False, the same helper the tool catalog route uses (tool_router.py).configured_browser_availablereturnsFalsewhenenable_browseris off,container_browser_enabled(config)for docker runtime, andNonewhen this process must probe — sois not Falsepreserves all four built-ins for local runtime with the browser enabled (probe unresolved) and correctly dropsweb-researcherwhen config disables the browser or the docker image has no browser. That matches the stated design decision (config-only gating, no Chromium probe in this route) and keeps theF27.subagents-builtinfour-built-in contract. - Acceptance criteria. No-browser config yields the three non-browser built-ins; browser-enabled default is unchanged; user/project agents and the first-wins precedence loop are untouched.
- Tests.
test_get_sub_agents_follows_the_browser_setting[True]and[False]both pass;tests/agent_server/test_sub_agents_router.py,test_tool_router.py, andtest_api.pypass locally (11 + 47).ruff checkon the changed files passes. The new import does not introduce an import cycle (module imports cleanly), andlaunch.py/config.pyare already part of the server package. - CI. All check runs on this head are completed successfully (build/tests/coverage/OpenAPI schema), no failing checks.
- Feature map. The
F27.subagents-browser-disabledbullet now restarts withenable_browser: falseitself (so--onlyruns it in the right state), and its# bugmarker and known-bug prose are removed to describe the fixed behavior. - Stated non-goals.
/server_infousable_tools(F27.server-info-browser-disabled) and the import-timeregister_builtins_agents(enable_browser=True)intool_router.pyare correctly left out of scope; the PR description calls out both, and the residual delegation-registry behavior is documented in the map bullet.
Eval risk
This only changes which built-in agents a read-only catalog route advertises; it does not alter agent loop, prompts, or tool execution, so no benchmark eval is warranted. The change is gated behind enable_browser config and does not touch persisted settings, serialized events, or the TypeScript request/response shapes.
No material correctness, security, compatibility, or acceptance-criterion defect found.
✅ APPROVED
enyst
deleted the
claude/umbrella-bug-fixes-tgz9ai-subagents-browser-disabled
branch
October 14, 2026 20:19
This was referenced Nov 4, 2026
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.
HUMAN:
This PR proposes a fix for a bug uncovered during the first full agentic run of
verify-agent-server.AGENT:
I'm an AI agent (Claude Code) helping Engel Nyst (@enyst) with project maintenance.
Requested by Engel · project thread
Decision needed
What should hide
web-researcher: only the server config, or also the Chromium probe?configured_browser_available(config), the same helper the tool catalog uses:enable_browser: falsehides it, and so does a Docker runtime whose image has no browser. When the browser is enabled but this process finds no Chromium,web-researcheris still listed. This matches what the issue asks for, keeps the route cheap (no probe), and keeps the existingF27.subagents-builtincontract (four built-ins on a server without Chromium).is_tool_usable(BROWSER_TOOL_NAME), aslive_launch_runtimedoes for launches). The list would then match what a launch can actually run, but it changes the built-in list on machines without Chromium, andF27.subagents-builtinand its tests would need updating.Why
With
enable_browser: false,POST /api/sub-agentsstill listed the built-inweb-researcher, whose only tool isbrowser_tool_set. The tool catalog on the same server already reports that tool as unusable, so a client could offer a sub-agent that has no usable tool. The route calleddiscover_builtin_agents()with its defaultenable_browser=True, ignoring the config.Summary
get_sub_agentspassesenable_browser=configured_browser_available(config) is not Falsetodiscover_builtin_agents. The function already filteredweb-researcher; it was just never told to.enable_browser) intests/agent_server/test_sub_agents_router.py.F27.subagents-browser-disablednow restarts withenable_browser: falseitself. Before, it relied on an earlier bullet's restart, so--onlyran it with the browser enabled. Its# bugmarker is removed and the prose describes the fixed behaviour.Issue Number
Fixes #5911
How to Test
uv run pytest tests/agent_server/test_sub_agents_router.py tests/agent_server/test_tool_router.py tests/agent_server/test_api.py: 58 passed. On main, the newtest_get_sub_agents_follows_the_browser_setting[False]fails.control-agent-server map run --file F27 --only F27.subagents-browser-disabled --fresh --repeat 2 --checkout <main checkout>:xfail,xfailAGENT_SERVER_VERIFY_CHECKOUT=<worktree>):xpass,xpasscontrol-agent-server map checkreports no problems, andmap run --only F27.subagents-browser-disabled --freshpasses.F27.subagents-builtinandF27.subagents-precedencestill pass (--only, fresh).pre-commit runon the changed files: passed.Video/Screenshots
n/a
Type
Notes
Out of scope:
/server_infousable_tools(F27.server-info-browser-disabled, handled separately), and the import-timeregister_builtins_agents(enable_browser=True)intool_router.py, which keepsweb-researcherin the delegation registry used by conversations. No TypeScript client change is needed because the request and response shapes are unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_014MKndVj7XWvRQmvW9w2bDg
Generated by Claude Code
🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdkpython-node-runtimepython-node-runtimepython-node-runtimegolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:c5dc63d-pythonRun
All tags pushed for this build
About Multi-Architecture Support
c5dc63d-python) is a multi-arch manifest supporting both amd64 and arm64c5dc63d-python-amd64) are also available if needed