When I run agent-server from docker using the `mai...
# proj-agent
w
When I run agent-server from docker using the
main-python
tag, I get version: unknown
Copy code
{
  "uptime": 38,
  "idle_time": 38,
  "title": "OpenHands Agent Server",
  "version": "unknown",
  "sdk_version": "1.21.1",
  "tools_version": "1.21.1",
  "workspace_version": "unknown",
  "build_git_sha": "unknown",
  "build_git_ref": "unknown",
  "python_version": "3.13.13 (main, Apr  7 2026, 20:43:47) [Clang 22.1.1 ]",
  "usable_tools": [
    "delegate",
    "file_editor",
    "task_tool_set",
    "task",
    "task_tracker",
    "terminal",
    "browser_tool_set",
    "edit",
    "list_directory",
    "read_file",
    "write_file",
    "glob",
    "grep",
    "planning_file_editor"
  ],
  "docs": "/docs",
  "redoc": "/redoc"
}
@nutritious-balloon-65098 investigate why build_git_sha, build_git_ref, and version are unknown.
n
I'm on it! Robert Brennan can track my progress here.
Summary of my work: I investigated why
build_git_sha
,
build_git_ref
, and
version
show as
unknown
in
agent-server
when running the
main-python
Docker image. Answer •
build_git_sha
and
build_git_ref
are
unknown
because the published CI Docker build for
main-python
does not pass
OPENHANDS_BUILD_GIT_SHA
or
OPENHANDS_BUILD_GIT_REF
into the Docker build.
◦
server_info
reads those values only from environment variables. ◦ The Dockerfile defines those args with defaults of
unknown
. ◦ The local
build.py
helper passes them, but the GitHub Actions workflow that builds/pushes the image only passes
BASE_IMAGE
, so the defaults remain in effect. •
version
is
unknown
because the
main-python
image is built from the PyInstaller/binary target, and that frozen runtime does not reliably include
openhands-agent-server
distribution metadata for
importlib.metadata.version("openhands-agent-server")
.
◦
server_details_router.py
gets
version
through
importlib.metadata.version(...)
and falls back to
unknown
on failure. ◦ The binary image copies only the built executable, not a normal installed Python package environment. ◦ The PyInstaller spec explicitly preserves metadata for some third-party packages, but not for
openhands-agent-server
or
openhands-workspace
, which explains why
version
and
workspace_version
can be
unknown
. Net conclusion There are two separate causes: 1. Missing CI build args →
build_git_sha
,
build_git_ref
2. Missing/unstable package metadata in PyInstaller runtime →
version
(and likely
workspace_version
) Changes made • No code changes were made. • This was investigation only.
w
@nutritious-balloon-65098 fix both problems and open a pull request
n
I'm on it! Robert Brennan can continue tracking my progress here.
OpenHands encountered an error: **Request timeout after 30 seconds to https://tlvcplxnojovsqpr.prod-runtime.all-hands.dev/api/conversations/47b3210d-2a2f-424f-a6e1-73ad03526639/ask_agent** See the conversation for more information.