Conversation
Reproduces OpenAI streaming breakage when Sentry tracing is enabled with LangGraph agent.stream() and streamMode: ["messages"]. Based on community feedback from rad20c's comment suggesting tracesSampleRate is the key config that causes the issue. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Switch from @langchain/langgraph createReactAgent to langchain v1 createAgent - Load .env via dotenv for OPENAI_API_KEY - Add chunk counting and timing to both endpoints - Update README with test results: bug does not reproduce on latest @sentry/nestjs@10.42.0 + langchain@1.2.29 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| "@nestjs/common": "^10.0.0", | ||
| "@nestjs/core": "^10.0.0", | ||
| "@nestjs/platform-express": "^10.0.0", | ||
| "@sentry/nestjs": "^10.41.0", |
There was a problem hiding this comment.
Caret version range prevents bug reproduction
Medium Severity
The @sentry/nestjs dependency uses ^10.41.0 (caret range), which resolves to the latest 10.x on npm install. The README explicitly states the bug does not reproduce on @sentry/nestjs@10.42.0 (the version a fresh install gets). This means anyone cloning and running this reproduction will not observe the reported bug. For the reproduction to be useful, the version needs to be pinned to an exact version where the bug manifests. Additionally, the README suggests "pinning to 10.41.0 may reproduce it," but notes the fix was in 10.39.0 — so 10.41.0 already includes the fix, making that guidance contradictory.


Summary
langchainv1createAgentwithagent.stream()andstreamMode: ["messages"]in a NestJS app with@sentry/nestjsTest Results
On latest versions, the bug does not reproduce:
/stream-agent/stream-agent/stream-modelBoth agent and model streaming work correctly with
@sentry/nestjs@10.42.0.How to test
🤖 Generated with Claude Code