GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — runs.subscribeToRun().withStreams() aborts active stream pipes as soon as the run status stream closes · Issue #5076 · triggerdotdev/trigger.dev

runs.subscribeToRun().withStreams() aborts active stream pipes as soon as the run status stream closes #5076

New issue
Copy link
New issue
Copy link
Open
Open
runs.subscribeToRun().withStreams() aborts active stream pipes as soon as the run status stream closes#5076
Copy link

Description

@shafiktanbir
shafiktanbir
opened on Oct 26, 2026
Issue body actions

What version of Trigger.dev are you using?

main (commit dd5eec1)

What Node.js version are you using?

20.18.0

What operating system are you using?

Linux

What build tool are you using?

tsup

Describe the Bug

When consuming runs.subscribeToRun(runId).withStreams(), the subscription aborts its shared abort signal as soon as the upstream run status stream finishes. If a task emits realtime stream chunks right before completing, the outer stream and its child stream subscriptions get aborted before buffered or in-flight stream events finish draining, so trailing stream chunks are dropped.

Reproduction Steps

  1. Trigger a task that writes several chunks to a realtime stream and immediately returns.
  2. Subscribe to the run using for await (const part of runs.subscribeToRun(runId).withStreams()).
  3. Observe that once the terminal run snapshot is read from the upstream run stream, the shared abort signal fires right away and cancels the outer stream reader and active realtime stream pipes before all queued stream chunks are yielded.

Expected Behavior

withStreams() should allow buffered run updates and active child stream subscriptions to finish draining naturally when the run completes, and only abort everything when the caller explicitly unsubscribes or cancels the outer stream.

Additional Context

Happy to open a PR with a test for this if you would like to vouch it!

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.