Conversation
sohamb117
force-pushed
the
feat/subagent-remote-workspaces
branch
from
September 20, 2026 03:09
a72b80e to
b192f5c
Compare
Contributor
|
sohamb117
force-pushed
the
feat/subagent-remote-workspaces
branch
from
September 20, 2026 22:23
255e068 to
c557255
Compare
sohamb117
marked this pull request as ready for review
September 20, 2026 22:24
Collaborator
|
🚦 CI is currently failing on this PR's latest commit. Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request This is an automated check - no AI was used to generate this comment. |
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
sohamb117
force-pushed
the
feat/subagent-remote-workspaces
branch
from
September 20, 2026 23:30
c557255 to
47412dc
Compare
Author
Author
|
@xingyaoww @neubig |
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.
HUMAN:
Why
Currently, there are primitives that support executing agents in sandboxes/remotely. However, this feature is not extended to subagents. This PR provides that capacity, extending primitives for remote execution to subagents.
Summary
We add an optional Workspace Factory to TaskManager that allows remote workspaces to be created or connected for subagents.
Issue Number
Addresses #5195
AGENT:
Why
A local parent should be able to delegate work to isolated remote sandboxes without replacing its own workspace or introducing a scheduler/provider abstraction.
Summary
workspace_factory(child_id, agent_type) -> RemoteWorkspace | Noneto TaskManager, TaskToolSet.create, and DelegateExecutor. Returning None preserves local execution.max_budget_per_runthrough the remote request/server path, and add unit, real-server, and real-GPT-5-mini Docker coverage.Issue Number
Addresses #5195
How to Test
Post-rebase validation on upstream
9c3571a6, SDK feature heada72b80ef:uv sync --frozen --dev .venv/bin/pytest tests/tools/test_remote_subagents.py tests/tools/task tests/tools/delegate tests/sdk/conversation/remote tests/agent_server/test_models.py tests/agent_server/test_event_service.py tests/agent_server/test_conversation_service.py -q --disable-warnings --maxfail=3 .venv/bin/pytest tests/cross/test_remote_conversation_live_server.py -k 'remote_subagent or subagent_workspace_factory_returns_result' -q --disable-warnings --maxfail=2Results: 489 passed and 4 passed, respectively. The cross-tests use real HTTP and WebSockets with a deterministic LLM and cover Task/Delegate result return and remote budget enforcement.
Real-model reproduction (Docker/Colima required):
The test builds a minimal source image from the current checkout. To reuse a matching local image, set
AGENT_SERVER_IMAGE.Observed real-model run before the final rebase: local GPT-5-mini parent → two distinct Docker workspaces → remote child terminal/finish execution → resume both original tasks → exact private file contents/results → unchanged parent file → both HTTP clients closed and containers removed. PASS, 165.75 seconds, reported total cost $0.0196272. No LLM or transport mocking in this run.
That run used the feature source later committed as
58a5a2d1and an SDK 1.46.0 image built from the same working tree. Its feature changes were rebased unchanged; the real paid Docker scenario has not been rerun with an SDK 1.47.0 image after the final rebase. The four real-server cross-tests above were rerun after rebase.Video/Screenshots
Non-UI feature. Representative real-model runner output:
Local full report and logs:
tests/integration/outputs/openai_gpt_5_mini_gpt5-mini-colima-minimal_N1_20260911_232029/.These generated artifacts are not tracked. They were checked for API-key-shaped text; none was present.
Design Doc
The factory/ownership contract and examples are documented in the companion docs change:
OpenHands/docs#791,
branch
feat/subagent-remote-workspaces, commit4a905c81.Type
Notes
9c3571a6atagent/stream_context.py:287andllm/utils/telemetry.py:264,270,272. These files are unchanged by this PR. The same checker passes on the SDK files changed here. The full pre-commit run is therefore not green.integration-testlabel and human review before merge.Jev-Fast-Audit
⚡ Jev fast audit · estimates · 0.58s · commit c557255⚠️ reduced context — partial coverage; 32/130 hunks, 8/31 files (context budget: 32, file budget: 23, hunk budget: 98).
Strongest signal: No primary concern selected.
Evidence: No primary concern to locate.
Coverage:
All estimates and evidence