Repository navigation
Fix DockerWorkspace execute_command timeout issue - #871
Merged
Merged
Conversation
Contributor
Coverage Report •
|
||||||||||||||||||||
neubig
marked this pull request as ready for review
October 23, 2025 01:38
neubig
marked this pull request as draft
October 23, 2025 03:53
The SDK was calling /api/bash/execute_bash_command which is a synchronous endpoint that returns BashOutput immediately. However, the SDK code was treating it as async and trying to poll for results using the wrong ID (output event ID instead of command ID). Root cause: - execute_bash_command returns BashOutput with id=output_event_id - SDK used this output event ID to poll for bash events - Polling found 0 results since output events are not searchable - After 30s timeout, command failed Fix: - Use /api/bash/start_bash_command which is the correct async endpoint - This endpoint returns BashCommand with id=command_id - SDK's existing polling logic works correctly with this command ID Fixes #870 Co-authored-by: openhands <openhands@all-hands.dev>
neubig
force-pushed
the
openhands/fix-docker-workspace-timeout
branch
from
October 23, 2025 04:05
3538a40 to
dd3a749
Compare
Collaborator
neubig
marked this pull request as ready for review
October 23, 2025 21:23
juanmichelini
self-requested a review
October 23, 2025 21:23
xingyaoww
pushed a commit
that referenced
this pull request
Oct 23, 2025
This test verifies that the correct /api/bash/start_bash_command endpoint is used when executing bash commands. This is a regression test for issue #866 where the incorrect endpoint /api/bash/execute_bash_command was being used, causing command execution to timeout. The fix was implemented in PR #871, and this test ensures that the correct endpoint continues to be used and prevents future regressions. Co-authored-by: openhands <openhands@all-hands.dev>
vivekvjnk
pushed a commit
to vivekvjnk/agent-sdk
that referenced
this pull request
Nov 17, 2025
Co-authored-by: openhands <openhands@all-hands.dev>
StressTestor
pushed a commit
to StressTestor/software-agent-sdk
that referenced
this pull request
Jun 1, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
4 tasks
5 tasks
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.
Summary
Fixes #870 - Resolves the timeout issue when using
execute_commandin RemoteWorkspace.Root Cause Analysis
The SDK was calling the wrong API endpoint for asynchronous command execution:
Wrong endpoint used:
/api/bash/execute_bash_commandBashOutputwithid=output_event_idand a separatecommand_idfieldID mismatch: SDK used the wrong ID for polling
bash_command["id"]which was the output event IDCorrect endpoint:
/api/bash/start_bash_commandBashCommandwithid=command_idChanges Made
execute_bash_commandtostart_bash_commandinremote_workspace_mixin.pyTesting
✅ All existing tests pass
✅ Manual integration test with actual RemoteWorkspace confirms commands execute successfully without timeout
Impact
Agent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
golang:1.21-bookwormeclipse-temurin:17-jdknikolaik/python-nodejs:python3.12-nodejs22Pull (multi-arch manifest)
Run
All tags pushed for this build
The
cd99d7ftag is a multi-arch manifest (amd64/arm64); your client pulls the right arch automatically.