Skip to content

fix: root messages inbox bounds - #8312

Open
langsmith-fleet[bot] wants to merge 2 commits into
mainfrom
fix/root-messages-inbox-bound
Open

fix: root messages inbox bounds#8312
langsmith-fleet[bot] wants to merge 2 commits into
mainfrom
fix/root-messages-inbox-bound

Conversation

@langsmith-fleet

Copy link
Copy Markdown
Contributor

Summary

  • bound the async root messages inbox using the existing stream max_queue_size
  • raise a clear RuntimeError when root-scope message buffering overflows instead of allowing unbounded growth
  • apply the same bounded/overflow behavior to the sync root messages inbox for parity
  • add targeted async/sync tests for inbox bounds and overflow handling

Fixes Corridor finding: https://app.corridor.dev/projects/310af3f2-00f7-413d-8311-2265c3518990/findings/7b6d6f7c-1668-421f-a67b-2b4f3bc49da5

Testing

  • python3 -m py_compile libs/sdk-py/langgraph_sdk/_async/stream.py libs/sdk-py/langgraph_sdk/_sync/stream.py libs/sdk-py/tests/streaming/test_scoped_handles.py libs/sdk-py/tests/streaming/test_sync_projections.py

Note: targeted pytest could not run in the sandbox because pytest was not installed in the available Python environment; uv run --no-sync also could not find pytest without syncing dependencies.

@jkennedyvz John Kennedy (jkennedyvz) changed the title Fix root messages inbox bounds fix: root messages inbox bounds Jul 9, 2026
@jkennedyvz
John Kennedy (jkennedyvz) marked this pull request as ready for review July 9, 2026 04:09
@jkennedyvz
John Kennedy (jkennedyvz) enabled auto-merge (squash) July 9, 2026 04:09

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 1 potential issue.

Open in WebView Open SWE trace

Comment thread libs/sdk-py/langgraph_sdk/_async/stream.py Outdated
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant