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.

[Bug]: Missing Runtime Services information in non development modes (NPM&Docker) seems to cause Automation creation to fail #2387

Closed

Description

@DevinVinson

Operating System

macOS

Installation Method

Docker (ghcr.io/openhands/agent-canvas)

Agent Canvas Version

1.0.0-beta.6

Bug Description

My agent was struggling to make an automation and was asking for an OPENHANDS_API_KEY. Digging deeper I saw that it had no Skills or <RUNTIME_SERVICES>.

If I compare my running dev copy to my docker I see that docker seems to cut off right at </PROCESS_MANAGEMENT> . The IMPORTANT, and CURRENT_DATETIME are also not included when compared to my npm run dev agent canvas.

Steps to Reproduce

  1. Run with docker and put a non-default local folder in the $PROJECTS_PATH value
  2. Start a conversation: flip a coin
  3. Click the + symbol, click Show Agent Tools & Metadata
  4. Scroll to the bottom of the System Message and see content end with </PROCESS_MANAGEMENT>

Actual Behavior

No skills loaded, no local runtime info.

Expected Behavior

Everything should load.

Relevant Logs

Screenshots

No response

Additional Context

I had OpenHands investigate and there is a proposed fix but with the missing skills and other content I am not going to try and make a PR just yet. Here is the results from that initial look:

 dug into where <RUNTIME_SERVICES> is set and why it can be missing in Docker. Here’s what I found and fixed:

✅ Root cause
<RUNTIME_SERVICES> is built from VITE_RUNTIME_SERVICES_INFO at build time (via Vite). The Docker image builds the frontend without that env var, so the runtime services block never gets appended to the agent’s system prompt.

✅ Fix implemented
I added a runtime injection path so the Docker entrypoint can supply the JSON at container startup:

scripts/static-server.mjs now accepts --runtime-services-info <json> and injects it into index.html as:
window.__AGENT_CANVAS_RUNTIME_SERVICES_INFO__
src/api/agent-server-adapter.ts now falls back to that window value when VITE_RUNTIME_SERVICES_INFO is missing.
docker/entrypoint.sh now builds the runtime services JSON (based on actual ports) and passes it into the static server.
Added a test case proving the window fallback works.
Files changed
src/api/agent-server-adapter.ts
scripts/static-server.mjs
docker/entrypoint.sh
__tests__/api/agent-server-adapter.test.ts
Notes
Docker now uses 127.0.0.1 for URLs to avoid IPv6 loopback issues.
This only affects static builds (like Docker); dev builds still rely on VITE_RUNTIME_SERVICES_INFO.

Activity

  1. DevinVinson commented on Jun 3, 2026

    @DevinVinson
    MemberAuthor

    Needs to be re-run with newest Beta to verify.

  2. lilagrc commented on Jun 3, 2026

    @lilagrc
    Contributor

    Automations are not working on docker in the latest beta, I get this error I attempted to create an OpenHands cloud automation for you, but I encountered an access issue: the cloud automation service (app.all-hands.dev) is rejecting the API keys available in this environment.

  3. linear commented on Jun 4, 2026

    @linear

    from tim:

    These work for me on rc1:

    image.png
  4. changed the title [-][Bug]: Agent Metadata has missing content in Docker[/-] [+][Bug]: Missing Runtime Services information in non development modes (NPM&Docker) seems to cause Automation creation to fail[/+] on Jun 4, 2026
  5. DevinVinson commented on Jun 4, 2026

    @DevinVinson
    MemberAuthor

    I went back and tried local dev (npm run dev), docker on rc1, and agent-canvas cli with npm. I now get that the <RUNTIME_SERVICES> is explicitly only loaded in development mode.

    However that bit of extra information seems to be the key in helping the agent setup an automation.

    NPM:
    Image

    Docker:
    Image

    And then when I provide the runtime services block with the local api information:

    Image
  6. DevinVinson commented on Jun 4, 2026

    @DevinVinson
    MemberAuthor

    Testing from the docker image in #1125 seems to work:

    Image
  7. VascoSch92 commented on Jun 4, 2026

    @VascoSch92
    Member

    @DevinVinson i think you can close the issue ;)

  8. transferred this issue fromOpenHands/OpenHandson Jul 27, 2026
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions