Skip to content

Handle late cross-kind command failures - #1591

Open
Juns-g wants to merge 1 commit into
get-bb:mainfrom
Juns-g:juns/fix-timeline-execution-kind-mismatch
Open

Handle late cross-kind command failures#1591
Juns-g wants to merge 1 commit into
get-bb:mainfrom
Juns-g:juns/fix-timeline-execution-kind-mismatch

Conversation

@Juns-g

@Juns-g Juns-g commented Aug 14, 2026

Copy link
Copy Markdown

Problem

Some providers emit commandExecution/completed, then report the same call ID again as a failed generic toolCall. The second terminal event currently throws Cannot merge command with tool-call, so one record can make the thread timeline return 500.

Fix

  • keep the finalized command row and its command-specific fields
  • merge only the late error's output, completion time, and status
  • retain strict kind checks for non-finalized calls and existing dedupe for non-error terminal events

Verification

  • pnpm exec turbo run test --filter=@bb/thread-view --force (372 tests)
  • pnpm exec turbo run typecheck --filter=@bb/thread-view --force
  • Prettier and git diff --check

AGENT GENERATED: by GPT-5

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