You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cursor-sdk 1.2.0 adds a summary stream message (SDKSummaryMessage) and the related interaction updates (SummaryStartedUpdate, SummaryUpdate, SummaryCompletedUpdate). Our event dispatcher silently drops them. They look like Cursor's context summarization (compaction) step, which is useful to see in a trace: it explains token-usage drops, and a failed or fallback summary explains degraded answers.
Found while reviewing the weekly dependency bump in #1037 (cursor-sdk 1.0.40 → 1.2.0). Low priority. Confirm the semantics with Cursor's docs or changelog before building on this.
The stream message carries only status / fallback. The summary text arrives only on the SummaryUpdate interaction update.
Our code
Dispatcher:CursorRunTracker.add_event switches on event.sdk_message.type for thinking, assistant, tool_call and usage. Every other type, including summary, is ignored.
Interaction updates: not consumed at all, so SummaryUpdate.summary is unreachable today.
Related 1.2.0 change (already safe)
TokenUsage.total_tokens no longer includes cache read/write tokens. We don't depend on it, because _usage_metrics computes its own totals. A regression test would still be cheap.
Suggested approach
Get a real recording that contains a summary. The current latest cassettes (re-recorded in chore(deps): weekly dependency update #1037) have none. A long multi-turn agent run may trigger one. Cursor tests use the bridge VCR scrubber in _test_vcr.py.
Decide the shape. Options:
a span event or metadata on the run span (summary_status, summary_fallback, summary_failed);
a small child span for the summarization step, if there's timing and text worth showing.
Handle summary in add_event, and gate on the type existing: the 1.0.25 matrix pin doesn't emit it.
Run cd py && nox -s "test_cursor_sdk(latest)" and "test_cursor_sdk(1.0.25)".
Activity
AbhiPrasad commentedon Nov 3, 2026
released with https://github.com/braintrustdata/braintrust-sdk-python/releases/tag/py-sdk-v0.49.2