OpenHands / OpenHands/OpenHands
fix: advertise host services correctly to Docker conversations
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 88.6k
- Forks
- 11.6k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 189
Description
Steps to Reproduce
- Start
agent-canvaswithOH_CONVERSATION_RUNTIME=dockerand Automation enabled. - Start a conversation.
- From that conversation container, resolve
host.docker.internaland request/api/automation/healthat 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.

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.internalwhenOH_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/healthsucceeds 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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