Skip to content

Add MultiSessionOptions with worker_address to session admission - #910

Draft
Shivs11 wants to merge 1 commit into
sticky-activity-session-optionsfrom
shivam/multi-session-options
Draft

Shivs11 wants to merge 1 commit into
sticky-activity-session-optionsfrom
shivam/multi-session-options

Conversation

@Shivs11

@Shivs11 Shivs11 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What changed?
Stacked on #885. Adds a second admission member to WorkerSessionOptions:

oneof admission {
    SingleSessionOptions single_session = 1;
    MultiSessionOptions multi_session = 2;
}

message MultiSessionOptions {
    // Set by the SDK to the worker's sticky queue name; not user-configurable (for now).
    string worker_address = 1;
}

Why?
General (multi-session) workflow sessions need to recover when their worker dies. When the session's next task starts on another worker, including a task taken from the normal queue, the server binds the session to that worker and reschedules pending session work onto its sticky queue. To do that, the server needs the worker's address on the poll. Today, general workers send only WorkerSessionOptions{} on sticky polls.

Breaking changes
None on released APIs (experimental, unreleased).

Server PR
Follows; server-side start binding is still in design.

General (multi-session) workers need to send their address on polls so
the server can bind a workflow session to the worker when a task starts
on it, including tasks taken from the normal queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oneof admission {
// If specified, the worker only polls for work belonging to its session.
SingleSessionOptions single_session = 1;
// If specified, the worker can serve multiple sessions at once.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i could be missing something, but in my head a general session worker == multi-session worker since it can serve multiple workflows-as-sessions (which is why i scraped off using 'GeneralSessionOptions' and made this)

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.

1 participant