Relationships
#3918 stagecraft remote studio: one long-lived connection to serve instead of a swamp process per read
Opened by stack72 · 10/25/2026· Shipped 10/26/2026
Follow-up from swamp-club #3658 (@swamp/stagecraft).
The remote studio (studio serve with the server input) reads serve through swampRunner in stagecraft/extensions/models/_lib/engine/studio_remote.ts, which starts a new swamp process for every read: model search, one model get per opened factory, and data query per watched work-item set. Each process boots the full CLI (about 300 MB and 40-80% CPU on the reporter's Mac).
The #3658 fix polls only while a studio page is open and backs off from 15s to 60s while nothing changes, which removes the cost when no page is open. A page left open (including a background tab) still costs 1 + N processes per poll.
Asked for in #3658: keep one connection to serve for the studio's reads, or one long-lived CLI or session, instead of a new process per query. This likely needs swamp-side support (a persistent client or an API the extension can call with the operator's login and grants) so the reads keep carrying the operator's identity, as --server does today.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.