Repository navigation
fix(agents): pi and OpenHands installed into a task container work in its working directory - #321
Merged
Merged
Conversation
… its working directory Both started from their install folder and fell back to /workspace, so an install_agent into a task container left them outside the task's files, where Claude Code works in the container's working directory. start.sh now names the directory it's started in as the workspace, unless that's the root; the image keeps /workspace. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
End to end at 4717896 on one m5.2xlarge (linux/amd64) admin VM.
No containers were left behind, and the results contain no secret text. The VM, security group and key pair are deleted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why. pi and OpenHands, installed into a task container by
install_agent, work in/workspace, not the container's working directory. Eachstart.shchanges to its install folder, and the agent falls back to its image's/workspace. So a task whose files live in the container's WORKDIR is invisible to them. Claude Code works in the container's working directory.#314's e2e found this:
--agent piinstalled pi into a Debian task container whose WORKDIR is/workspace/task_repo, and pi answered "The file/workspace/notes.txtdoes not exist". A task that names pi ininstall_agenthits the same thing.Change
start.sh(install only) names the directory it was started in as the workspace, unless that's/.docker execstarts it in the container's working directory.PI_A2A_WORKSPACE/OPENHANDS_A2A_WORKSPACE. OpenHands'a2a_server.pyalready read its variable; pi's now reads its own the same way./workspace./appas its workspace, which its README documents. The e2e below shows what that means for the same task.Tests
tst/unit/agents/test_installed_workspace.pyruns each agent's realstart.sh, with a stub server that records the workspace it would get:/, it gets none, so the image default applies.test_a2a_server_serves_the_workspace_its_environment_names: pi's server takes the variable, and/workspacewithout it.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
Installed pi and OpenHands agents now use the directory where
start.shbegins, unless it is/.Reviews (1) · Last reviewed commit: "fix(agents): pi and OpenHands installed ..." · Reviewed by Greptile