Skip to content

[FEATURE]: pluggable session execution for crash-resumable sessions #42678

Description

@moedash

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Today a session lives and dies with the serving process. If the daemon or host dies mid-turn, the in-flight turn is lost; a session can't resume on another machine, and a long background run needs the process to stay alive for hours.

The v2 engine already concentrates execution behind a small abstraction: SessionExecution is four methods (active / wake / resume / interrupt), and the turn work happens in drains behind it. That abstraction is nearly a driver contract already.

The request is to let a config or env switch pick a session-execution driver, keep the in-process driver as the default, and define the contract so an external orchestrator can supply durability: crash resume mid-turn, resume on a different worker from shared storage, detached long runs.

We (@temporalio) built a working proof on a fork (temporalio#2): the session supervisor is written once and runs under two drivers, in-process by default and as a Temporal workflow with one activity per step. A session survives kill -9 of the worker mid-turn and completes on a fresh worker; worktrees rebuild from snapshot packs in the shared store. We'd rather upstream this (and optionally a reference driver) than carry a fork, and we're happy to change it to whatever contract you'd accept.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions