Skip to content

Fix agent server windows crash#4115

Open
KHARSHAVARDHAN-eng wants to merge 2 commits into
OpenHands:mainfrom
KHARSHAVARDHAN-eng:fix-agent-server-windows-crash
Open

Fix agent server windows crash#4115
KHARSHAVARDHAN-eng wants to merge 2 commits into
OpenHands:mainfrom
KHARSHAVARDHAN-eng:fix-agent-server-windows-crash

Conversation

@KHARSHAVARDHAN-eng

Copy link
Copy Markdown

HUMAN:

Tested locally in a clean environment.


AGENT:

Why

Related to #4156.

Running openhands-agent-server in an isolated environment (for example via uvx) can fail during startup with ModuleNotFoundError because the server imports modules from the openhands.tools namespace, but openhands-tools is not declared as a runtime dependency.

Since openhands-tools also depends on libtmux, both imports are unavailable in a clean installation, causing the server to crash before startup.

Summary

  • Add openhands-tools as a runtime dependency of openhands-agent-server.
  • Regenerate the lockfile.
  • Ensure openhands.tools and its transitive dependencies (including libtmux) are installed automatically.
  • Fix startup of openhands-agent-server in isolated uvx environments.

Testing

# Reproduced in a clean virtual environment
uv pip install openhands-agent-server

# Verified server startup
python -m openhands.agent_server

# Lint
make lint

# Test suite
uv run pytest tests/agent_server/

@all-hands-bot

Copy link
Copy Markdown
Collaborator

[Automatic Post]: It has been a while since there was any activity on this PR. @KHARSHAVARDHAN-eng, are you still working on it? If so, please go ahead, if not then please request review, close it, or request that someone else follow up.

This comment was generated by an AI agent (OpenHands) on behalf of the user.

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.

2 participants