Skip to content

[Feature]: Expose conversation runtime lifecycle and recovery capabilities #4993

Closed

Description

@neubig

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

PR #3403 introduces an outer Agent Server that can own per-conversation runtimes, but the public conversation contract does not distinguish agent execution state from runtime availability. Today a missing container, an execution failure, and lost runtime ownership can collapse into similar errors, leaving clients unable to decide whether recovery is possible.

This contract is necessary before archive or Canvas work because runtime missing != conversation archived and execution failed != runtime missing.

Desired Behavior

Expose canonical lifecycle metadata for every conversation, including a typed execution status, runtime status, can_resume, and structured runtime error details. Add outer-server operations that query runtime availability, reprovision a missing owned runtime around retained state, and explicitly resume after reprovisioning. Ownership loss should be represented as lifecycle data rather than converted into an agent execution error.

This work should build on the conversation-scoped runtime API and #3403 without expanding #3403 beyond its Docker runtime foundation.

Acceptance Criteria

  • Conversation responses expose additive, typed execution_status, runtime_status, can_resume, and optional runtime_error fields.
  • Runtime status distinguishes at least available, starting, missing, and ownership-lost states.
  • The outer Agent Server can query availability without provisioning a runtime.
  • A missing runtime can be reprovisioned only when retained state and ownership make recovery safe.
  • Resuming execution is explicit and separate from reprovisioning.
  • Local mode remains backward compatible and Docker-mode tests cover container loss, ownership loss, reprovision, and resume.
  • OpenAPI and clients/typescript are regenerated or updated in the same PR.
  • Public API documentation explains lifecycle semantics.

Alternatives Considered

Inferring lifecycle from HTTP failures or a legacy Cloud sandbox_status leaves clients coupled to deployment details and cannot distinguish archive, runtime loss, or execution failure.

Priority / Severity

High - Significant impact on productivity

Estimated Scope

Large - Significant feature requiring architecture changes

Feature Area

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

Technical Implementation Ideas (Optional)

Use explicit enums/models in the Agent Server contract and keep runtime-specific inspection behind the existing runtime route/registry abstraction. Prefer additive fields to preserve REST compatibility.

Additional Context

Foundation: #3403. This is the first follow-up in the lifecycle/archive stack.

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

Activity

  1. added
    enhancement
    on Sep 12, 2026
  2. added
    ready-for-dev
    on Sep 12, 2026
  3. github-actions commented on Sep 12, 2026

    @github-actions
    Contributor

    ✅ ready-for-dev label applied

    This issue meets the readiness criteria and is ready for contribution.
    A contributor can now open a PR that links this issue (Fixes #<number>).

    This is an automated check — no AI was used to generate this comment.

  4. all-hands-bot commented on Sep 18, 2026

    @all-hands-bot
    Collaborator

    Proposed closure: completed. PR #4998 ("Fixes #4993") merged into feat/agent-server-docker-runtime, which shipped to main via PR #3403 (2026-09-16). Current main exposes the requested lifecycle contract: typed execution/runtime status and can_resume in openhands-agent-server/openhands/agent_server/models.py and conversation_router.py. Maintainers should verify before closing.

    This comment was generated by an AI agent (OpenHands) on behalf of the user.

  5. all-hands-bot commented on Sep 25, 2026

    @all-hands-bot
    Collaborator

    Proposed closure: completed.

    PR #4998 (Fixes #4993) merged on 2026-09-13 and shipped to main via PR #3403. main now exposes the typed conversation lifecycle metadata requested here (execution status vs runtime status, can_resume, and structured runtime error details). Maintainers should verify before closing.

    This comment was generated by an AI agent (OpenHands) on behalf of the user.

  6. neubig commented on Sep 25, 2026

    @neubig
    MemberAuthor

    Closing as completed: PR #4998 merged and shipped to main through PR #3403, exposing the requested conversation runtime lifecycle contract.

    This issue was reviewed against the linked implementation and current main branch. This comment was generated by an AI agent (OpenHands) on behalf of the user.

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

    enhancementready-for-dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions