Skip to content

fix: make local runtime use host-writable paths and local cache defaults#12015

Merged
enyst merged 6 commits intoOpenHands:mainfrom
Wangmerlyn:fix/local-runtime-compat
Dec 18, 2025
Merged

fix: make local runtime use host-writable paths and local cache defaults#12015
enyst merged 6 commits intoOpenHands:mainfrom
Wangmerlyn:fix/local-runtime-compat

Conversation

@Wangmerlyn
Copy link
Copy Markdown
Contributor

Summary of PR

  • Local runtime: if runtime=local and no workspace_base is provided, default to a host-writable path (./workspace/local) or allow override via LOCAL_WORKSPACE_BASE; ensure the directory is created. Docker runtime is untouched.
  • Browser env: when runtime=local, default Playwright cache to ~/.cache/playwright and BrowserGym downloads to ~/.cache/browsergym-downloads; otherwise keep the existing /workspace/.downloads/ for docker.

Change Type

  • Bug fix

Checklist

  • I have read and reviewed the code and I understand what the code is doing.
  • I have tested the code to the best of my ability and ensured it works as expected.

Fixes

Resolves #12014

Release Notes

  • Include this change in the Release Notes.

Local (non‑Docker) runs now use host‑writable paths by default and keep Playwright downloads out of /workspace, preventing permissions errors and making it easier to find your files on the host.

@mamoodi mamoodi requested a review from tofarr December 16, 2025 19:53
@tofarr
Copy link
Copy Markdown
Collaborator

tofarr commented Dec 18, 2025

Nice fix!

Copy link
Copy Markdown
Collaborator

@tofarr tofarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. In V1 we use browser_use instead of browser gym so I don't think we will need to migrate this one

@Wangmerlyn
Copy link
Copy Markdown
Contributor Author

Wangmerlyn commented Dec 18, 2025

LGTM. In V1 we use browser_use instead of browser gym so I don't think we will need to migrate this one

Oh yes since V1 is now fully integrated into OpenHands, this PR doesn't seem do a lot, merging it improves only the v0 experience.
But today I was using the V1 OpenHands and found when I have export RUNTIME=local it has the same browser gym error. You can find the corresponding issue here: #12081

It doesn't seem normal since the V1 version should be using the browser tool instead of BrowserGym.
I had a chat with Engel in the slack channel about the cause of this problem and now the bug is found, you can find our discussion here: https://openhands-ai.slack.com/archives/C06U8UTKSAD/p1766071596020719?thread_ts=1765960627.454069&cid=C06U8UTKSAD .

It seems V0 is still triggered when RUNTIME=local, this is from a env var collision between v0 and v1. So merging this PR can also be quick fix for this problem.

But a more root-cause fix could be fixing the env var collision, as I mentioned in the slack channel.
Thank you so much for the review. 😊

@enyst enyst merged commit d90579b into OpenHands:main Dec 18, 2025
22 checks passed
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.

[Bug]: Local runtime should avoid /workspace defaults and use writable host paths

4 participants