Skip to content

[Bug]: POST /api/sub-agents lists the browser-only web-researcher when enable_browser is false #5911

Closed

Description

@enyst

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

  1. In a checkout of main: uv sync.
  2. Start the server with the browser disabled, e.g. a config file containing {"enable_browser": false, "session_api_keys": ["dev-key"]} passed via OPENHANDS_AGENT_SERVER_CONFIG_PATH, then uv run python -m openhands.agent_server --host 127.0.0.1 --port 8000.
  3. 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]' lists web-researcher.
  4. Control: curl -s -H 'X-Session-API-Key: dev-key' http://127.0.0.1:8000/api/tools/catalog reports browser_tool_set with usable: 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-agents leaves out web-researcher when 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.py covers both configurations.
  • The map bullet F27.subagents-browser-disabled passes with its # bug marker 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) calls discover_builtin_agents() with no argument.
  • discover_builtin_agents(enable_browser: bool = True) (openhands-tools/openhands/tools/preset/default.py:111) already filters web-researcher when enable_browser is False (line 128), but the default True is 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 in tool_router.py:57); the sub-agents route never reads request.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

  1. added
    bug
    on Oct 14, 2026
  2. enyst commented on Oct 14, 2026

    @enyst
    MemberAuthor

    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?

    • Implemented: config only, using configured_browser_available(config), the same helper the tool catalog uses. enable_browser: false hides it, and so does a Docker runtime whose image has no browser. When the browser is enabled but no Chromium is found, web-researcher is still listed. This matches this issue's acceptance criteria, keeps the route probe-free, and keeps the F27.subagents-builtin contract (four built-ins on a server without Chromium).
    • Alternative: also hide it when the Chromium probe fails, as launches do (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, and F27.subagents-builtin and its tests would need updating.

    Also: the map bullet relied on an earlier bullet's enable_browser: false restart, so it ran with the browser on under --only. The PR makes the bullet restart with that config itself, then removes its # bug marker. Proof: xfail x2 on main, xpass x2 on the branch.


    Generated by Claude Code

  3. added
    ready-for-dev
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-for-dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions