OpenHands / OpenHands/OpenHands

fix: advertise host services correctly to Docker conversations

Open
#17,517 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

agent-canvas bug docker priority:medium ready-for-dev release-note-required type: fix
Dominant language
TypeScript
Stars
88.6k
Forks
11.6k
Avg merge
2d 22h
Merged PRs (30d)
189

Description

Steps to Reproduce
  1. Start agent-canvas with OH_CONVERSATION_RUNTIME=docker and Automation enabled.
  2. Start a conversation.
  3. From that conversation container, resolve host.docker.internal and request /api/automation/health at the runtime-service URL advertised by Canvas.
Actual Behavior

Canvas advertises localhost, which points to the child Agent Server and returns 404. The host ingress is reachable by its Docker bridge IP, but host.docker.internal is not defined.

Live Docker conversation before the fix

Expected Behavior

The SDK should give Docker conversations a stable host.docker.internal host-gateway alias. Canvas should advertise host-side services using that alias and route Automation requests through its existing ingress. Local conversations should continue using localhost.

Acceptance Criteria
  • The published Canvas CLI advertises host-side runtime services through host.docker.internal when OH_CONVERSATION_RUNTIME=docker.
  • Local conversation mode continues to advertise localhost.
  • Agent Server itself remains advertised at the child container's loopback URL.
  • Focused tests cover both runtime modes.
  • Live Docker conversation evidence shows /api/automation/health succeeds at the advertised URL.
Dependency

Requires OpenHands/software-agent-sdk#5164 to map host.docker.internal to Docker's host-gateway in each conversation container.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the published Canvas CLI path that selects the Docker and local conversation runtimes, then trace how runtime-service URLs and the Agent Server URL are advertised. Check the focused tests for both runtime modes and verify the Docker host-gateway dependency is available. Done means Docker advertises host-side services through host.docker.internal, local mode keeps localhost, and the live Automation health request succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript
Domain
backend, cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.