Skip to content

agentOs() actors crash on action calls in Engine (runner) mode #1457

@turisanapo

Description

@turisanapo

agentOs() actors work in standalone mode but crash when connected to a remote Engine.

Error:

TypeError: undefined is not an object (evaluating 'conn[CONN_STATE_MANAGER_SYMBOL].hibernatableData')
    at onCreateConn (chunk-3WAPIQIQ.js:856:31)
    at connectConn (agent-os/index.js:7126:26)

Repro:

Requires rivetdev/engine:latest running on port 6420.

// server.ts
import { agentOs } from "rivetkit/agent-os";
import { setup } from "rivetkit";

const vm = agentOs({ options: {}, onPermissionRequest: async () => {}, onSessionEvent: () => {} });
const registry = setup({ use: { vm }, endpoint: "http://default:admin@localhost:6420" });
registry.start();
// client.ts
import { createClient } from "rivetkit/client";
const client = createClient("http://localhost:6420");
const handle = client.vm.getOrCreate(["test"]);
await handle.action({ name: "createSession", args: ["pi", { env: {} }] });

Expected: Action executes successfully (as it does in standalone mode without endpoint).

Actual: Runner logs internal error and client receives "Internal error. Read the server logs for more details."

Versions:

  • rivetkit@2.2.1
  • rivetdev/engine:latest
  • Bun 1.3.12 (macOS arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions