Skip to content

Conversation

@nikomatsakis
Copy link
Member

ActiveSession now has a 'responder lifetime that encodes whether responders are still active. This prevents calling proxy_remaining_messages() on sessions from run_session() where responders would die on return.

New APIs:

  • ActiveSession::response() - builds NewSessionResponse for forwarding
  • ActiveSession::proxy_remaining_messages() - only on 'static sessions
  • SessionBuilder::spawn_session_proxy() - convenience for inject + proxy

Removed SessionBuilder::proxy_session() which was an anti-pattern that combined too many concerns.

Updated cookbook with both simple (spawn_session_proxy) and advanced (spawn_session + proxy_remaining_messages) patterns.

ActiveSession now has a 'responder lifetime that encodes whether
responders are still active. This prevents calling proxy_remaining_messages()
on sessions from run_session() where responders would die on return.

New APIs:
- ActiveSession::response() - builds NewSessionResponse for forwarding
- ActiveSession::proxy_remaining_messages() - only on 'static sessions
- SessionBuilder::spawn_session_proxy() - convenience for inject + proxy

Removed SessionBuilder::proxy_session() which was an anti-pattern that
combined too many concerns.

Updated cookbook with both simple (spawn_session_proxy) and advanced
(spawn_session + proxy_remaining_messages) patterns.
@nikomatsakis nikomatsakis merged commit 706e739 into symposium-dev:main Dec 22, 2025
1 check passed
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