Skip to content

ActionController::Live support #155

Closed

Description

@erickreutz

An example using ActionController::Live would be really cool.

https://api.rubyonrails.org/classes/ActionController/Live.html

Activity

  1. kevinjcoleman commented on Nov 10, 2025

    @kevinjcoleman

    Definitely interested in this @erickreutz did you ever dig in here?

  2. koic commented on Apr 11, 2026

    @koic
    Member

    Thanks for the suggestion. Looking at the current architecture, I don't see a clear benefit to adding an ActionController::Live example:

    1. Controller pattern (new transport per request): Sessions cannot be shared across requests (Mcp-Session-Id is lost because @sessions is cleared when a new StreamableHTTPTransport is instantiated). Progress and Sampling all depend on session persistence, so ActionController::Live streaming doesn't help in this case.
    2. Mount pattern / shared transport (Make StreamableHTTPTransport a Rack application #263): StreamableHTTPTransport already sets Content-Type: text/event-stream and writes to the stream via Rack 3 Streaming Body. The SDK stores the stream in @sessions[session_id][:post_request_streams][request_id] so tools can write progress notifications and sampling requests during execution. ActionController::Live would be edundant here.
    3. Premise: The SDK already returns text/event-stream for session-based requests, so there's no gap that ActionController::Live would fill.

    If there's a specific use case I'm missing, please let me know. Otherwise, I'll close this issue. Thank you.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions