Skip to content

bug: useRealtimeRunsWithTag hides runs older than 24h even with createdAt: '1w' #3018

@isshaddad

Description

@isshaddad

Provide environment information

N/A

Describe the bug

Runs that have been running for 24+ hours (or created more than 24 hours ago) do not appear in useRealtimeRunsWithTag on the client, even when passing createdAt: '1w'. They are visible via runs.list and in the dashboard.

Expected: With createdAt: '1w', all runs with the given tag from the last week (including long-running ones) are streamed and appear in the hook.

Actual: The realtime endpoint caps the createdAt filter to REALTIME_MAXIMUM_CREATED_AT_FILTER_AGE_IN_MS (default 24h). So only runs created in the last 24 hours are included; runs older than that are excluded regardless of the client's createdAt value.

Reproduction repo

n/a

To reproduce

  1. Create a run with a tag and let it run (or sit in a waiting state) for 24+ hours.
  2. In the app, use useRealtimeRunsWithTag('your-tag', { createdAt: '1w' }).
  3. The run does not appear in the hook's runs array, but it does appear in runs.list and in the dashboard.

Additional information

  • Root cause: apps/webapp/app/services/realtimeClient.server.ts#calculateCreatedAtFilter clamps the filter to env.REALTIME_MAXIMUM_CREATED_AT_FILTER_AGE_IN_MS (default 24h in env.server.ts).
  • No client-side workaround; the cap is applied server-side.
  • Fix: increase the default (or make it configurable), or allow the client's requested window up to a defined max.

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