docs: rewrite Custom Sandbox guide for v1, archive v0 content#598
docs: rewrite Custom Sandbox guide for v1, archive v0 content#598VascoSch92 wants to merge 2 commits into
Conversation
The Custom Sandbox guide documented v0-only settings (SANDBOX_BASE_CONTAINER_IMAGE / base_container_image) that are read nowhere in v1, so 1.x users following it from the Docker sandbox page hit "Sandbox failed to start". - Rewrite usage/advanced/custom-sandbox-guide.mdx for v1: build a custom agent-server image via --build-arg BASE_IMAGE= and point OpenHands at it with AGENT_SERVER_IMAGE_REPOSITORY / AGENT_SERVER_IMAGE_TAG. - Move the original v0 content to usage/v0/advanced/V0_custom-sandbox-guide.mdx under the V0 Reference group, with the standard legacy banner. - Point the V0 Docker runtime page at the V0 guide. Closes #597
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
✅ Review complete. This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here. |
all-hands-bot
left a comment
There was a problem hiding this comment.
🟡 Taste Rating: Acceptable — The V0 archive plus V1 replacement is the right structure, but one source-verified accuracy issue needs correction before merge.
[CRITICAL ISSUES]
- [openhands/usage/advanced/custom-sandbox-guide.mdx, Line 67] Docs Accuracy: The guide says
--target sourcematches the default-pythonimage, but the SDK publishes thepythonvariant withTARGET: binary, andbuild.pydefaults tobinary. Fix the command/prose to use--target binaryas the default-equivalent build, or explicitly describesourceas a dev/debug alternative.
[IMPROVEMENT OPPORTUNITIES]
- [Overall PR] Stale entry points: This PR fixes the main Custom Sandbox page, but there are still unversioned/current docs references that can send users toward old sandbox-image terminology (
openhands/usage/environment-variables.mdxlistsSANDBOX_BASE_CONTAINER_IMAGE, andopenhands/usage/run-openhands/github-action.mdxlinks “Custom Sandbox” fromOPENHANDS_BASE_CONTAINER_IMAGE). If those are valid for a separate product path, add product/version-specific wording; otherwise this leaves another path to the broken V0-era guidance.
Source Verification
| Documentation claim | Verified? | Source evidence |
|---|---|---|
V1 resolves the default/custom agent-server image from AGENT_SERVER_IMAGE_REPOSITORY + AGENT_SERVER_IMAGE_TAG, falling back when either is absent |
✅ | sandbox_spec_service.py#L101-L106 |
Docker sandbox exposes the agent server on container port 8000 and uses /health for readiness |
✅ | docker_sandbox_service.py#L605-L638, docker_sandbox_service.py#L254-L257 |
SDK Dockerfile accepts ARG BASE_IMAGE and has source / binary agent-server targets |
✅ | Dockerfile#L6-L7, Dockerfile#L350-L372 |
--target source matches the default published -python image |
❌ | The publish workflow sets TARGET: binary for the image matrix (server.yml#L317-L324), and build.py makes binary the default target (build.py#L386, build.py#L536-L538). |
[TESTING GAPS]
- CI status is healthy for the docs checks I inspected: Mintlify deployment, Mintlify internal links, and Mintlify link-rot all passed. No additional runtime test is required for this docs-only PR, but the incorrect source claim above should be fixed.
[RISK ASSESSMENT]
- [Overall PR]
⚠️ Risk Assessment: 🟡 MEDIUM
This is documentation-only and has passing docs checks, but it is user-facing setup guidance for custom sandbox images. A wrong build-target/default-image claim can lead users to build and maintain a non-default agent-server image shape, so the accuracy issue should be fixed before merge.
VERDICT:
❌ Needs rework: The structure is sound, but the default image/build target mismatch needs correction first.
KEY INSIGHT:
The PR correctly moves users from V0 runtime-image customization to V1 agent-server image customization, but the V1 guide must mirror the actual published binary image pipeline.
Improve this review? If any feedback above seems incorrect or irrelevant to this repository, you can teach the reviewer to do better:
- Add a
.agents/skills/custom-codereview-guide.mdfile to your branch (or edit it if one already exists) with the/codereviewtrigger and the context the reviewer is missing. See the customization docs for the required frontmatter format.- Re-request a review - the reviewer reads guidelines from the PR branch, so your changes take effect immediately.
- When your PR is merged, the guideline file goes through normal code review by repository maintainers.
Resolve with AI? Install the iterate skill in your agent and run
/iterateto automatically drive this PR through CI, review, and QA until it's merge-ready.Was this review helpful? React with 👍 or 👎 to give feedback.
This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation. View conversation
The published <release>-python agent-server image is built with TARGET=binary (build.py defaults to binary; only non-binary targets get a tag suffix). Correct the custom-image build to use --target binary as the default-equivalent, and describe source / *-minimal as alternatives.
|
Fixed the critical accuracy issue in 824988f. The build command now uses Re: the stale-entry-points improvement — |
Problem
usage/advanced/custom-sandbox-guide.mdx("Custom Sandbox") was never migrated from v0. It lives in the current docs tree (Local GUI → Advanced), has no version banner, and is linked from the v1 Docker sandbox page — yet it documents v0-only settings that don't exist in 1.x:-e SANDBOX_BASE_CONTAINER_IMAGE=custom-imagebase_container_image="custom-image"inconfig.tomlnikolaik/python-nodejs:python3.12-nodejs22SANDBOX_BASE_CONTAINER_IMAGEis read nowhere in v1, so the custom image is silently ignored and users hitSandbox failed to start(reported in OpenHands/OpenHands#15018).Changes
Per the issue, this both archives the v0 content and puts a correct v1 guide in place:
usage/advanced/custom-sandbox-guide.mdxfor v1. In v1 the sandbox container is the agent-server, so customization means building a custom agent-server image on top of your base via--build-arg BASE_IMAGE=against the SDK Dockerfile, then pointing OpenHands at it withAGENT_SERVER_IMAGE_REPOSITORY/AGENT_SERVER_IMAGE_TAG.usage/v0/advanced/V0_custom-sandbox-guide.mdxand added it to the V0 Reference group indocs.json, with the standard legacy banner.The link in
usage/sandboxes/docker.mdxkeeps the same path and now resolves to the corrected v1 guide.Verification
get_agent_server_image()resolvesAGENT_SERVER_IMAGE_REPOSITORY+AGENT_SERVER_IMAGE_TAG(defaultghcr.io/openhands/agent-server:<release>-python); the agent-server Dockerfile acceptsARG BASE_IMAGE; the container runs on port8000and is polled at/health.docs.jsonis valid JSON.mint broken-linksreports no new broken links (the 2 pre-existing ones are in untouched SDK files).Closes #597