Skip to content

Self-hosted: agentOS inspector tabs (Filesystem/Processes/Terminal/System) fail; wrong gateway token, plus Safari stream bodies #2042

Closed

Description

@discohead

Environment

  • Self-hosted control plane rivetdev/engine:2.3.27 (file-system storage, single node)
  • agentOS worker rivetdev/services:0.2.0 on pool services (also reproduced on 0.2.1); the actor's /metadata reports {"runtime":"rivetkit","version":"2.3.16"}
  • Dashboard served by the engine at /ui, signed in with the admin token
  • Chrome and Safari on macOS

Steps

  1. Create a VM: PUT /actors?namespace=default with {"name":"agentOS","key":"smoke-vm","runner_name_selector":"services","crash_policy":"sleep"}. v1.process.run through the gateway works.
  2. Open the actor in the dashboard.

Actual

The Metadata tab works. The Filesystem, Processes, Terminal and System tabs all show:

  • Chrome: Runtime error · Authentication token is invalid. · See the actor logs for the underlying error.
  • Safari: Runtime error · HTTP request error: Request failed: NotSupportedError: ReadableStream uploading is not supported

Engine logs for the Chrome case:

level=warn message="Request failed" err="invalid_token: Authentication token is invalid." uri=/gateway/<actorId>@REDACTED/action/v1.vm.status
level=warn message="websocket failed" err="invalid_token: Authentication token is invalid." uri=/gateway/<actorId>@REDACTED/connect

Cause 1 (every browser): the tab uses the inspector token as the gateway token

The dashboard posts the custom tab init message as { authToken: inspectorToken, rivetToken }. This matches the contract in rivetkit/src/inspector-tab/mod.ts, where authToken is the per-actor inspector bearer token and rivetToken is the outer Rivet token.

The agentOS tab bundle served at /inspector/custom-tabs/filesystem/ builds its client from authToken (minified excerpt):

createClient({ poolName: "services", endpoint: window.location.origin, token: authToken, encoding: "bare", disableMetadataLookup: true })
  .getForId("agentOS", actorId).connect()

The engine then validates the inspector token as a gateway token and rejects it. In the same position, the admin token and a JWT from POST /auth/tokens both work:

  • /gateway/<id>@<adminToken>/metadata returns 200
  • /gateway/<id>@<jwt>/metadata returns 200

Suggested fix: use rivetToken for the RivetKit client, and keep authToken for Authorization: Bearer on inspector HTTP routes.

Cause 2 (Safari only): RivetKit 2.3.16 streams request bodies

rivetkit@2.3.16 engine-client/actor-http-client.ts forwards actorRequest.body (a ReadableStream) with duplex: "half". WebKit does not support streaming uploads, so every action POST throws NotSupportedError. rivet-dev/rivet 4e3fe3a16 ("send request bodies as bytes for browser clients", first released in v2.3.24) fixes this.

Suggested fix: rebuild rivetdev/services on rivetkit >= 2.3.24.

Chrome is unaffected by cause 2 only because it allows streaming uploads over HTTP/2. Firefox likely fails the same way as Safari.

Activity

  1. eersnington commented on Oct 19, 2026

    @eersnington
    Member

    thanks for reporting! this is fixed in the upcoming agentos release, and stream body issue should be fixed too in safar (related fixed in rivetkit 2.3.27 #5802), so ive updated agento's rivetkit version. make sure to update rivetkit as well

    before:
    Image

    after:
    Image

  2. eersnington commented on Oct 20, 2026

    @eersnington
    Member

    forgot to give you the safari screenshot :)

    Image
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions