Fix Claude background task lifecycle UI#259
Open
brsbl wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three confirmed Claude background-task lifecycle failures:
thread/resumeidempotent so a reconnect/resume for the live provider session does not close the SDK session and stop background workRoot Cause Evidence
turn/completed; one example completed roughly 39,974s after the turn completed. That confirms the shared lifecycle mismatch: turn done is not background work done.activeWorkflow/activeBackgroundCommandscould be empty even though the task was still open.turn/completed, so a still-running background workflow had no working indicator.thread/resumepreviously closed an existing live Claude SDK session before starting/resuming, which could interrupt open background tasks.Unverified/not changed here: subagent/monitor task materialization remains intentionally excluded by current filters, and quick completed tasks can still leave the active-card list immediately because active cards represent only pending tasks.
Changes
item/started.local_workflowandlocal_bash, plus app render smoke for background-only working indicators.Validation
pnpm exec turbo run test --filter=@bb/serverpnpm exec turbo run test --filter=@bb/dbpnpm exec turbo run test --filter=@bb/agent-runtimepnpm exec turbo run test --filter=@bb/app -- --run src/components/thread/timeline/ThreadTimelinePanelContent.test.tsxpnpm exec turbo run test --filter=@bb/server -- --run test/public/public-thread-data.test.ts -t "surfaces active"pnpm exec turbo run typecheck --filter=@bb/dbpnpm exec turbo run typecheck --filter=@bb/serverpnpm exec turbo run typecheck --filter=@bb/agent-runtimepnpm exec turbo run typecheck --filter=@bb/app