Skip to content

V2: port transform and interruption durability across both model paths #35467

Description

@opencode-agent

Scope

Port the existing transform and interruption durability behavior to V2 in packages/core. This must cover both model execution paths:

  • the @opencode-ai/llm path;
  • the AI SDK path.

Neither path should have weaker persistence or recovery semantics.

Requirements

  • Persist transform results needed for deterministic replay/recovery before dependent continuation or side effects.
  • Represent interruption durably and settle any in-flight assistant/tool state without leaving orphaned or permanently pending parts.
  • After replay or restart, project the same terminal/interrupted state rather than a successful-looking incomplete message.
  • Keep the durability contract aligned across both paths, ideally behind shared core behavior rather than two drifting implementations.
  • Add a parity test matrix covering normal completion, user interruption, and interruption followed by replay/restart for each path.

Related lifecycle/error-event design: #35016
Related typed LLM error work: #34995

Source: https://discord.com/channels/1391832426048651334/1447692703549755466/1523404602102517941

Metadata

Metadata

Assignees

Labels

2.0coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions