OpenHands / OpenHands/software-agent-sdk

Adopt the /sockets/session/{conversation_id} envelope

Open
#4,763 2 comments 0 reactions 1 assignee View on GitHub

@VascoSch92 is already working on this.

Since Aug 27, 2026.

enhancement
Dominant language
Python
Stars
1.1k
Forks
542
Avg merge
1d 19h
Merged PRs (30d)
137

Description

Blocked by the agent-server shipping /sockets/session/{conversation_id}: OpenHands/software-agent-sdk#4671. The server half landed in #4807. The remaining gate is the pinned release this client builds against — see The pin is the real gate below.

Why

clients/typescript/src/events/websocket-client.ts:103 hardcodes the endpoint:

const wsUrl = `${wsScheme}//${url.host}${url.pathname.replace(/\/$/, '')}/sockets/events/${this.conversationId}`;

This is the second independent socket client. Canvas builds its own URL separately (src/utils/websocket-url.ts:134 in OpenHands/OpenHands), and the Python SDK decodes separately (remote_conversation.py:239). All three need switching when the new endpoint lands.

Repo move

OpenHands/typescript-client is archived. This client now lives at clients/typescript in this repository, so two of the three switch sites — this one and remote_conversation.py — are in the same tree as the server that changed, and only canvas is out of repo.

That removes the original reason this was filed separately: the TypeScript client was easy to miss when the design discussion said "both clients". The work still has to happen; whether it is its own PR is now a choice rather than a constraint. See Open question.

What changes

Small. This client has zero references to StreamingDelta — it only consumes durable events — so there is no progress-frame handling to write. The change is:

  1. Point at /sockets/session/{conversation_id}.
  2. Unwrap the Durable envelope to its event payload, which decodes exactly as it does today (verified byte-identical to what the legacy endpoint sends).
  3. Decide whether to expose seq and the after_seq cursor on the public client API — that is what makes resumable reconnect available to consumers, and it replaces the legacy resend_mode / after_timestamp pair, which compared naive local timestamps.

Release train

The original note here said this client had an independent release-please train needing its own version bump. That is obsolete. After the move it ships with the SDK release:

  • .github/workflows/typescript-client-npm-publish.yml triggers on release: published for v* tags of this repository, with working-directory: clients/typescript.
  • clients/typescript/package.json is at 1.44.1 — the same version as openhands-sdk.

So no separate version bump, and no separate release to wait on.

The pin is the real gate

Living in the monorepo does not mean this client is built or tested against the server in the tree. Both the generated types and the integration test read a pinned agent-server release:

  • clients/typescript/package.jsonconfig.agentServerImage is ghcr.io/openhands/agent-server:1.44.0-python.
  • clients/typescript/scripts/agent-server-openapi.mjs fetches openapi.json from the release matching that pin and rejects an artifact whose version differs.
  • .github/workflows/typescript-client-integration-tests.yml resolves the same value and pulls that image to run against.

1.44.0 was cut on 2026-08-27 and the latest release, 1.44.1, on 2026-08-28 — both before #4807 merged on 2026-09-03. No published release contains /sockets/session/{id} yet, so the Durable envelope has no generated type and the integration test cannot reach the endpoint. Bumping config.agentServerImage to the first release that contains #4807 is a prerequisite for this issue, not part of it.

Open question

With both clients now in one tree and on one version, the Python remote_conversation.py switch and this one could land as a single PR rather than two. Worth deciding before starting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.