Skip to content

fix(client): recover lost conversation create responses - #5036

Draft
neubig wants to merge 2 commits into
mainfrom
fix/typescript-create-response-recovery
Draft

neubig wants to merge 2 commits into
mainfrom
fix/typescript-create-response-recovery

Conversation

@neubig

@neubig neubig commented Sep 14, 2026

Copy link
Copy Markdown
Member

HUMAN:


AGENT:

Why

A conversation can be created and its initial message started even if its POST response is lost. The TypeScript client currently reports failure, leaving Canvas unable to open that conversation.

Summary

Reconcile a transport failure with bounded GET requests using the caller's stable conversation ID. Never replay the create POST. Preserve ordinary HTTP errors and the original transport error if reconciliation fails. This is independent of runtime routing and Docker provisioning.

Issue Number

Closes #5035. Extracted from #4966 to keep the runtime API foundation focused.

How to Test

cd clients/typescript && npm run test:coverage && npm run lint && npm run build && npm run format:check

324 tests passed across 20 suites. Six targeted tests use a real HTTP server to drop a successful POST response, delay visibility, and check rejection handling. Against main, four recovery scenarios fail; all six pass with this fix. Live before/after Canvas recordings inject the same lost successful response. Before the fix, Canvas shows disconnected errors; after it, the real agent completes without an error. Both cases send exactly one create POST.

Type

  • Bug fix

Notes

Targets main and is not a prerequisite for the runtime PR stack. The default additional recovery window is 120 seconds; callers can set creationRecoveryTimeout.


🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python-slim amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22-slim Link
python amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22-slim Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:7b69c3a-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-7b69c3a-python \
  ghcr.io/openhands/agent-server:7b69c3a-python

All tags pushed for this build

ghcr.io/openhands/agent-server:7b69c3a-golang-amd64
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-golang-amd64
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-golang-amd64
ghcr.io/openhands/agent-server:7b69c3a-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:7b69c3a-golang-arm64
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-golang-arm64
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-golang-arm64
ghcr.io/openhands/agent-server:7b69c3a-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:7b69c3a-java-amd64
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-java-amd64
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-java-amd64
ghcr.io/openhands/agent-server:7b69c3a-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:7b69c3a-java-arm64
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-java-arm64
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-java-arm64
ghcr.io/openhands/agent-server:7b69c3a-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:7b69c3a-python-amd64
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-python-amd64
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-python-amd64
ghcr.io/openhands/agent-server:7b69c3a-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-amd64
ghcr.io/openhands/agent-server:7b69c3a-python-arm64
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-python-arm64
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-python-arm64
ghcr.io/openhands/agent-server:7b69c3a-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-arm64
ghcr.io/openhands/agent-server:7b69c3a-python-slim-amd64
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-python-slim-amd64
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-python-slim-amd64
ghcr.io/openhands/agent-server:7b69c3a-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-slim-amd64
ghcr.io/openhands/agent-server:7b69c3a-python-slim-arm64
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-python-slim-arm64
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-python-slim-arm64
ghcr.io/openhands/agent-server:7b69c3a-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-slim-arm64
ghcr.io/openhands/agent-server:7b69c3a-golang
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-golang
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-golang
ghcr.io/openhands/agent-server:7b69c3a-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:7b69c3a-java
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-java
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-java
ghcr.io/openhands/agent-server:7b69c3a-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:7b69c3a-python-slim
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-python-slim
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-python-slim
ghcr.io/openhands/agent-server:7b69c3a-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-slim
ghcr.io/openhands/agent-server:7b69c3a-python
ghcr.io/openhands/agent-server:7b69c3a776d8897a6fbe39896e88701ca55b9f6f-python
ghcr.io/openhands/agent-server:fix-typescript-create-response-recovery-python
ghcr.io/openhands/agent-server:7b69c3a-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim

About Multi-Architecture Support

  • Each variant tag (e.g., 7b69c3a-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 7b69c3a-python-amd64) are also available if needed

Closes #5035

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result:PASSED

Action log

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions

Copy link
Copy Markdown
Contributor

📁 PR Artifacts Notice

This PR contains a .pr/ directory with temporary PR-specific documents. The directory will be automatically removed when the PR is approved.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recover a conversation after the TypeScript client loses its create response

2 participants