OpenHands / OpenHands/software-agent-sdk

[Feature]: Normalize Agent Server and legacy Cloud conversation lifecycle in TypeScript

Open
#4,996 1 comment 0 reactions 1 assignee View on GitHub

@neubig is already working on this.

Since Sep 14, 2026.

enhancement ready-for-dev
Dominant language
Python
Stars
1.1k
Forks
539
Avg merge
1d 19h
Merged PRs (30d)
137

Description

Is there an existing feature request for this?

  • I have searched existing issues and feature requests, and this is not a duplicate.

Problem or Use Case

Agent Canvas currently receives different lifecycle representations from Agent Server and legacy Cloud APIs. Without a client-boundary adapter, product code must infer archive state from Cloud sandbox_status === "MISSING", mixing backend/version compatibility logic into the UI and conflating archive with runtime loss.

Desired Behavior

clients/typescript should expose one normalized conversation lifecycle model for both backends. Native Agent Server responses should map canonical archive, runtime, execution, and resumability fields directly. The handwritten Cloud adapter may temporarily infer isArchived from legacy sandbox_status === "MISSING" only when explicit archive metadata is absent. That fallback must be isolated, documented as deprecated, tested, and governed by a concrete removal condition.

No compatibility fallback should be implemented in OpenHands/OpenHands.

Acceptance Criteria

  • A public normalized lifecycle model includes isArchived, nullable archivedAt, runtime status, execution status, and canResume.
  • Agent Server normalization consumes canonical fields without Cloud-specific behavior.
  • A handwritten Cloud adapter prefers explicit archived_at when present.
  • Legacy sandbox_status === "MISSING" inference exists only inside that Cloud adapter and does not fabricate an archive timestamp.
  • The legacy fallback is marked deprecated with its replacement and a concrete removal condition.
  • The implementation or PR opens and links a dedicated removal issue tied to Cloud deployment support for explicit archived_at.
  • Tests cover explicit archived/unarchived responses, legacy Cloud responses, missing runtimes, execution errors, and resumability.
  • Generated transport files remain generated; compatibility logic is handwritten and regeneration-safe.
  • OpenHands/OpenHands can consume the normalized model without backend or API-version checks.

Alternatives Considered

Adding fallback conditions directly in Canvas duplicates compatibility logic across components. Fabricating archivedAt from updated_at creates false data and is rejected.

Priority / Severity

High - Significant impact on productivity

Estimated Scope

Medium - New feature with moderate complexity

Feature Area

  • Agent Server
  • Integrations (GitHub, APIs, etc.)

Technical Implementation Ideas (Optional)

Keep generated wire models separate from a handwritten normalizeConversationLifecycle boundary. An internal source marker may distinguish explicit metadata from the deprecated legacy inference without leaking into Canvas.

Additional Context

This repository owns the active TypeScript client under clients/typescript; the standalone OpenHands/typescript-client repository is archived. Dependency: canonical lifecycle and archive contracts.

This issue was created by an AI agent (OpenHands) on behalf of the user.

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.