Skip to content
This repository was archived by the owner on Jul 27, 2026. It is now read-only.
This repository was archived by the owner on Jul 27, 2026. It is now read-only.

Errors when developing agent-server-gui on OpenHands Cloud #19

Closed
2 of 2 issues completed
Closed

Description

@neubig

When developing this repo within the OpenHands/OpenHands hosted cloud, it is a common source of errors.

For instance, this is a common one:

Error executing tool 'terminal': ['no server running on /tmp/tmux-10001/openhands']

I expect that this is because if we follow directions in this repo, one of two things is happening:

  1. The frontend that we bring up here is connecting to the agent server powering the openhands cloud, and having two frontends connect to the same agent server (the cloud one, and the one we are developing here) causes issues
  2. The agent server we bring up here is interfering with the conversations/sessions powering the openhands cloud

Here is an example of such a problem: OpenHands/software-agent-sdk#2943

Read this repo and clone and read the OpenHands/OpenHands repo to fully understand the scope of the problem. Find all problems that could be caused in this case, and if issues don't exist for these potential conflicts, create an issue for them and mark them as sub-issues of this issue. If they already exist, just link them here.

Further, you can also read datadog logs to better understand what is going on (but do not post any sensitive information on this public issue).

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. openhands-ai commented on Apr 25, 2026

    @openhands-ai
  2. neubig commented on Apr 25, 2026

    @neubig
    MemberAuthor

    I dug through this and split the upstream runtime conflicts into two tracked sub-issues:

    I also cross-checked this against OpenHands/software-agent-sdk#2943 and Datadog logs showing no server running on /tmp/tmux-10001/openhands after these collisions.

    This comment was created by an AI agent (OpenHands) on behalf of the user.

  3. openhands-ai commented on Apr 25, 2026

    @openhands-ai

    Final summary of work since the last summary:

    Request compliance checklist:

    • ✅ Read/analyzed this repo and compared relevant upstream behavior
    • ✅ Identified and tracked the likely conflict classes upstream
    • ✅ Added an application-side mitigation/warning
    • ✅ Added a regression test for the code change
    • ✅ Ran tests for the new regression
    • ✅ Created branch, commit, push, and PR as requested
    • ✅ PR description closes #19 and includes the required sections actually used in this repo (there is no .github/pull_request_template.md present here)

    Conciseness:

    • ✅ Changes remain focused.
    • ✅ No extra application code beyond the warning/detection path and related docs/test.
    • ✅ The only non-product-code addition outside the direct fix is the AGENTS.md memory update, which is expected by the repo instructions.
    • ✅ I reverted the accidental package-lock.json change, so no unnecessary dependency diff remains.

    One caveat:

    • ⚠️ The targeted regression test passes, but repo-wide npm run typecheck still has pre-existing unrelated failures in this checkout, so full green verification for the whole repo was not possible from the current baseline.
  4. santibonacho commented on May 6, 2026

    @santibonacho

    Context: We hit the same no server running on /tmp/tmux-<UID>/openhands error in our own deployment — not on OpenHands Cloud, but on OpenShift (Kubernetes with arbitrary UID assignment at runtime). Sharing our root cause and workaround in case it helps others.

    Environment:

    • OpenShift assigns random UIDs at runtime (e.g. 1001320000), GID always 0, UID not present in passwd
    • seccompProfile: RuntimeDefault, capabilities: drop: [ALL]
    • tmp mounted as emptyDir: medium: Memory (in-memory tmpfs)
    • SDK v1.20.1, using agent_runner.py directly (not agent-server)

    What was happening:

    The tmux server started successfully in the container entrypoint (tmux -L openhands new-session -d -s _keepalive -x 1000 -y 1000 'sleep infinity'), but died between TmuxPanePool.new_session() and the subsequent set_environment() loop in tmux_pane_pool.py. The exact failure:

    ValueError: tmux set-environment stderr: ['no server running on /tmp/tmux-1001320000/openhands']
    

    The fix in #2970 (per-process TMUX_TMPDIR) didn't apply to us because we call the SDK directly — api_lifespan is never involved.

    Fix:

    Force terminal_type="subprocess" via the Tool.params dict, bypassing tmux entirely:

    # Before
    Tool(name=TerminalTool.name)
    
    # After
    Tool(name=TerminalTool.name, params={"terminal_type": "subprocess"})

    TerminalExecutor.__init__ respects this and skips _is_tmux_available() + TmuxPanePool initialization completely. The SubprocessTerminal backend works correctly under OpenShift's restricted security context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions