Repository navigation
Description
I'm an AI agent (Claude Code) helping Engel Nyst (@enyst) with project maintenance.
Is there an existing issue for the same bug?
- I have searched existing issues and this is not a duplicate.
Bug Description
With the agent server configured enable_browser: false, the sub-agents catalog (POST /api/sub-agents) still lists the built-in web-researcher, whose only tool is browser_tool_set. The tool catalog on the same server correctly reports browser_tool_set as usable: false, and launches leave the browser out, so a client building a sub-agent picker from this route offers a sub-agent that has no usable tool.
Expected Behavior
With enable_browser: false, POST /api/sub-agents with {"load_user": false, "load_project": false} returns the built-ins without web-researcher (general-purpose, code-explorer, bash-runner). With the browser enabled (the default) the response is unchanged and still includes web-researcher.
Actual Behavior
All four built-ins are listed, including web-researcher, regardless of enable_browser.
Steps to Reproduce
- In a checkout of main:
uv sync. - Start the server with the browser disabled, e.g. a config file containing
{"enable_browser": false, "session_api_keys": ["dev-key"]}passed viaOPENHANDS_AGENT_SERVER_CONFIG_PATH, thenuv run python -m openhands.agent_server --host 127.0.0.1 --port 8000. curl -s -H 'X-Session-API-Key: dev-key' -H 'Content-Type: application/json' -d '{"load_user": false, "load_project": false}' http://127.0.0.1:8000/api/sub-agents | jq '[.agents[].name]'listsweb-researcher.- Control:
curl -s -H 'X-Session-API-Key: dev-key' http://127.0.0.1:8000/api/tools/catalogreportsbrowser_tool_setwithusable: false.
With the verify-agent-server skill: control-agent-server map run --file F27 --only F27.subagents-browser-disabled --fresh reports the known-bug bullet as an expected failure while the bug lasts.
Acceptance Criteria
-
POST /api/sub-agentsleaves outweb-researcherwhen the server's config disables the browser (enable_browser: false; for a Docker conversation runtime, whenever the catalog's configured browser availability is false). - With the browser enabled the built-in list is unchanged (still includes
web-researcher); project/user agents are unaffected. -
tests/agent_server/test_sub_agents_router.pycovers both configurations. - The map bullet
F27.subagents-browser-disabledpasses with its# bugmarker removed.
Installation Method
uv sync in a checkout of main
Version
main at 6e7a853
Additional Context
Root cause:
get_sub_agents(openhands-agent-server/openhands/agent_server/sub_agents_router.py:129) callsdiscover_builtin_agents()with no argument.discover_builtin_agents(enable_browser: bool = True)(openhands-tools/openhands/tools/preset/default.py:111) already filtersweb-researcherwhenenable_browseris False (line 128), but the defaultTrueis always used.- The tool catalog route already derives browser availability from config with
configured_browser_available(config)(openhands-agent-server/openhands/agent_server/launch.py:103, used intool_router.py:57); the sub-agents route never readsrequest.app.state.config.
Related (separate items, not in scope): /server_info usable_tools ignoring enable_browser (F27.server-info-browser-disabled), and the import-time register_builtins_agents(enable_browser=True) in tool_router.py that keeps web-researcher in the delegation registry.
Found by the first full agentic run of verify-agent-server; tracked in #5653.
Activity
enyst commentedon Oct 14, 2026
I'm an AI agent (Claude Code) helping Engel Nyst (@enyst) with project maintenance.
Fix proposed in #5921.
A maintainer needs to decide: 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 no Chromium is found,web-researcheris still listed. This matches this issue's acceptance criteria, keeps the route probe-free, and keeps theF27.subagents-builtincontract (four built-ins on a server without Chromium).live_launch_runtime). The list would then match what a launch can actually run, but the built-in list would change on machines without Chromium, andF27.subagents-builtinand its tests would need updating.Also: the map bullet relied on an earlier bullet's
enable_browser: falserestart, so it ran with the browser on under--only. The PR makes the bullet restart with that config itself, then removes its# bugmarker. Proof: xfail x2 on main, xpass x2 on the branch.Generated by Claude Code