Skip to content

Conversation

@howiefh
Copy link

@howiefh howiefh commented Dec 30, 2025

Prioritize using task_name/task_id from events, fallback to current_task_info to ensure correct task_id and task_name are obtained in StreamChunk


Note

Ensures StreamChunk uses task identifiers from the incoming LLMStreamChunkEvent when available.

  • In _create_stream_chunk, set task_name and task_id to event.task_name/event.task_id with fallback to current_task_info

Written by Cursor Bugbot for commit d4108a4. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

task_name=current_task_info["name"],
task_id=current_task_info["id"],
task_name=event.task_name or current_task_info["name"],
task_id=event.task_id or current_task_info["id"],
Copy link

Choose a reason for hiding this comment

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

Inconsistent task_index when event has different task info

The task_index is always sourced from current_task_info, while task_name and task_id now preferentially come from the event. If an event's task_id/task_name differs from current_task_info, the resulting StreamChunk will have task_index pointing to a different task than task_id/task_name. Before this change, all three fields came from the same source and were guaranteed consistent. Consumers of StreamChunk may expect these fields to reference the same task.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant