Skip to content

fix(agent-server): apply enable_browser to /server_info usable_tools - #5924

Merged
enyst merged 2 commits into
mainfrom
claude/umbrella-bug-fixes-tgz9ai-server-info-browser-disabled
Oct 15, 2026
Merged

enyst merged 2 commits into
mainfrom
claude/umbrella-bug-fixes-tgz9ai-server-info-browser-disabled

Conversation

@enyst

@enyst enyst commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

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

configured_browser_available(config) returns True in the docker runtime when the conversation image has the browser (the stock image). This PR applies that decision to usable_tools in both directions, like the catalog: in docker mode with the stock image, usable_tools now lists browser_tool_set even when the server process itself has no Chromium, because conversations (in containers) do get it. A maintainer should confirm that usable_tools means "usable by this server's conversations" rather than "usable in this process". The alternative is to only remove the browser when config disables it (False) and leave docker-mode True to the process probe; that would keep /server_info disagreeing with the catalog for the stock docker image (the gap the map's F27.catalog-docker-runtime bullet noted). Other tools in docker mode still come from the process probe either way.

Why

On a server started with enable_browser: false, GET /server_info listed browser_tool_set in usable_tools whenever the process found a Chromium, although GET /api/tools/catalog reports it usable: false and launched conversations never get the browser. A client reading usable_tools offered a tool the server would not provide.

Summary

  • build_server_info takes browser_available and get_server_info passes configured_browser_available(config), the same decision the catalog route applies; None (local runtime, browser enabled) keeps the Chromium probe.
  • Unit tests for the route with enable_browser=False and for build_server_info with None/True/False.
  • Map: F27.server-info-browser-disabled drops its # bug marker, declares Requires: F27.browser-probe, F27.browser-disabled (its setup, so --only works alone), and F27.catalog-docker-runtime now asserts usable_tools lists the browser for the stock image.

Issue Number

Fixes #5915

How to Test

  • uv run pytest tests/agent_server/test_server_details_router.py: the new disabled-browser test fails on main (browser_tool_set listed) and passes here; 14 passed. Also ran test_tool_router.py, test_api_authentication.py, test_event_streaming.py, telemetry/: 322 passed.
  • Map proof (setup bullets selected explicitly, since the bullet did not declare them on main):
    • main: control-agent-server map run --file F27 --only F27.browser-probe,F27.browser-disabled,F27.server-info-browser-disabled --fresh --repeat 2 --checkout <main checkout> -> xfail twice.
    • this branch, marker still present: same command without --checkout -> xpass twice (run's checkout is this worktree).
    • after dropping the marker: control-agent-server map check ok; map run --file F27 --only F27.server-info-browser-disabled,F27.catalog-docker-runtime --fresh -> both pass (the Requires: line pulled in the two setup bullets).
  • uv run pre-commit run --files <changed files>: all hooks pass.

Video/Screenshots

n/a

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

Separate from the Chromium probe fix for PLAYWRIGHT_BROWSERS_PATH (#5908) and from the sub-agents catalog ignoring enable_browser (F27.subagents-browser-disabled); this PR changes only /server_info.

🤖 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

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python-slim amd64, arm64 python-node-runtime Link
python-minimal amd64, arm64 python-node-runtime Link
python amd64, arm64 python-node-runtime Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:c3f2a8e-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-c3f2a8e-python \
  ghcr.io/openhands/agent-server:c3f2a8e-python

All tags pushed for this build

ghcr.io/openhands/agent-server:c3f2a8e-golang-amd64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-golang-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-golang-amd64
ghcr.io/openhands/agent-server:c3f2a8e-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:c3f2a8e-golang-arm64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-golang-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-golang-arm64
ghcr.io/openhands/agent-server:c3f2a8e-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:c3f2a8e-java-amd64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-java-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-java-amd64
ghcr.io/openhands/agent-server:c3f2a8e-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:c3f2a8e-java-arm64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-java-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-java-arm64
ghcr.io/openhands/agent-server:c3f2a8e-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:c3f2a8e-python-amd64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-python-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-python-amd64
ghcr.io/openhands/agent-server:c3f2a8e-python-node-runtime-amd64
ghcr.io/openhands/agent-server:c3f2a8e-python-arm64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-python-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-python-arm64
ghcr.io/openhands/agent-server:c3f2a8e-python-node-runtime-arm64
ghcr.io/openhands/agent-server:c3f2a8e-python-minimal-amd64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-python-minimal-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-python-minimal-amd64
ghcr.io/openhands/agent-server:c3f2a8e-python-node-runtime-minimal-amd64
ghcr.io/openhands/agent-server:c3f2a8e-python-minimal-arm64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-python-minimal-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-python-minimal-arm64
ghcr.io/openhands/agent-server:c3f2a8e-python-node-runtime-minimal-arm64
ghcr.io/openhands/agent-server:c3f2a8e-python-slim-amd64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-python-slim-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-python-slim-amd64
ghcr.io/openhands/agent-server:c3f2a8e-python-node-runtime-slim-amd64
ghcr.io/openhands/agent-server:c3f2a8e-python-slim-arm64
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-python-slim-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-python-slim-arm64
ghcr.io/openhands/agent-server:c3f2a8e-python-node-runtime-slim-arm64
ghcr.io/openhands/agent-server:c3f2a8e-golang
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-golang
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-golang
ghcr.io/openhands/agent-server:c3f2a8e-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:c3f2a8e-java
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-java
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-java
ghcr.io/openhands/agent-server:c3f2a8e-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:c3f2a8e-python-minimal
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-python-minimal
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-python-minimal
ghcr.io/openhands/agent-server:c3f2a8e-python-node-runtime-minimal
ghcr.io/openhands/agent-server:c3f2a8e-python-slim
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-python-slim
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-python-slim
ghcr.io/openhands/agent-server:c3f2a8e-python-node-runtime-slim
ghcr.io/openhands/agent-server:c3f2a8e-python
ghcr.io/openhands/agent-server:c3f2a8e96b7e3f9522436dab6c940d09e91f1c8c-python
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-server-info-browser-disabled-python
ghcr.io/openhands/agent-server:c3f2a8e-python-node-runtime

About Multi-Architecture Support

  • Each variant tag (e.g., c3f2a8e-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., c3f2a8e-python-amd64) are also available if needed

/server_info listed browser_tool_set in usable_tools whenever the process
found Chromium, even with enable_browser false, while the tool catalog and
launches leave the browser out. build_server_info now applies the same
configured_browser_available decision as the catalog route (which also
covers the docker runtime's conversation image). The F27 map bullet drops
its known-bug marker and declares its setup recipes.

Fixes #5915

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014MKndVj7XWvRQmvW9w2bDg
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result: ✅ PASSED

Action log

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-agent-server/openhands/agent_server
   server_details_router.py77297%29–30
TOTAL499201986360% 

@enyst
enyst marked this pull request as ready for review October 14, 2026 02:21
@enyst
enyst requested a review from all-hands-bot October 14, 2026 02:24

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This review was posted by an AI agent (OpenHands).

Reviewed head fc6ebe3 (matches the requested SHA). Scope is correct: the Agent Server REST surface is owned by this repository, and the linked issue #5915 is ready-for-dev (bug, priority:low).

What I verified on the current head:

  • The diff does what the description says: build_server_info takes browser_available, and get_server_info passes configured_browser_available(config) — the same helper the tool-catalog route uses. None (local runtime, browser enabled) keeps the process Chromium probe in charge, and non-browser tools are untouched.
  • Focused tests: uv run pytest tests/agent_server/test_server_details_router.py → 14 passed, including the new disabled-browser test and the None/True/False coverage of build_server_info.
  • Live endpoint check with a Chromium available in this environment, comparing /server_info usable_tools against the browser entry in /api/tools/catalog:
    • local, enable_browser=False → catalog usable=false, server_info omits browser_tool_set (agree)
    • local, enable_browser=True → both include it
    • docker, stock image → both include it
    • docker, -minimal image → both omit it
    • docker, conversation_image_has_browser=False → both omit it
      So /server_info now agrees with the catalog in every configuration, and the disabled case no longer advertises a tool the server will not hand to any conversation. Acceptance criteria 1 and 2 hold.
  • Import order is safe (no circular import between server_details_router and launch, checked both directions), and control-agent-server map check passes statically (935 ids, 0 problems).
  • Current-head CI: every check run on fc6ebe3 succeeds, including agent-server-tests and sdk-tests.

The one judgment call the description raises — docker mode with the stock image now lists the browser in usable_tools even though the server process cannot probe it — matches the catalog and the updated F27.catalog-docker-runtime bullet, so it is consistent with usable_tools meaning "usable by this server's conversations".

No material correctness, security, compatibility, or acceptance-criterion defect found.

✅ APPROVED

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMSJNcU77eZ2puc2tntZm5
@enyst

enyst commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

I'm an AI agent (Claude Code) helping Engel Nyst (@enyst) with project maintenance.

Merged main into this branch (c3f2a8e). The only conflict was in the F27 map, where main's sub-agents fix (F27.subagents-browser-disabled, no longer a known bug) and this PR's /server_info fix touched neighbouring lines; both are kept. The code merged cleanly, the router tests pass, and map check and pre-commit are clean.

agent-server-stress-tests is red on the merge commit, but it isn't caused by this PR: test_concurrent_conversations_isolated_and_fast fails the same way on main's head (75105bd, 0.59s against a 0.54s budget), and this PR doesn't touch conversation concurrency. I haven't found an existing fix for it. I've re-run the failed job once.


Generated by Claude Code

@enyst
enyst merged commit 8efff8d into main Oct 15, 2026
60 of 61 checks passed
@enyst
enyst deleted the claude/umbrella-bug-fixes-tgz9ai-server-info-browser-disabled branch October 15, 2026 01:24
@github-actions github-actions Bot mentioned this pull request Oct 15, 2026
1 of 7 tasks
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.

[Bug]: /server_info usable_tools lists browser_tool_set while enable_browser is false

3 participants