Skip to content

Fix - Make Remote runtime use /start for both new and resume #8564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

raymyers
Copy link
Contributor

@raymyers raymyers commented May 17, 2025

  • This change is worth documenting at https://docs.all-hands.dev/
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality this introduces.


Summarize what the PR does, explaining any non-trivial design decisions.

Simplify remote runtime by calling the /start endpoint on both new runtimes and resumes, since runtime-api can handle both cases this was duplicating the server-side logic.

We've recently seen trouble resuming Remote runtimes in OpenHands Cloud, which may be related to multiple being created in a race condition, so the hope is to improve consistency by letting runtime-api decide which existing runtime to use if any.

An error associated is

Error connecting to conversation : Could not find existing runtime for SID: "

Logged from here:

raise AgentRuntimeNotFoundError(

This will ignore the attach_to_existing option on create (not on close). That was added in #4329 (Oct 2024) and I don't think it currently adds anything useful on RemoteRuntime create, but @tofarr and @rbren may have more context.


Link of any specific issues this addresses:


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:364c571-nikolaik   --name openhands-app-364c571   docker.all-hands.dev/all-hands-ai/openhands:364c571

@raymyers raymyers changed the title Fix - Remote runtime uses /start for both new and resume Fix - Make Remote runtime use /start for both new and resume May 17, 2025
@enyst enyst requested a review from tofarr May 24, 2025 14:13
Copy link

openhands-ai bot commented May 28, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Run Python Unit Tests

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #8564

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant