Repository navigation
fix(server): reconcile stale tasks created by legacy steers - #104
Merged
Merged
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.
Historical MCP steers could leave follow-up tasks permanently
runningafter their child runs completed. This kept blue “Working” rows in the Agents sheet and a “Waiting on 4 subagents” banner beside the parent composer on desktop. The running provider could overwrite the follow-up's run binding from its startup snapshot, leaving multiple task registrations attached to a settled child thread.Upstream commit afc12ab70a already prevents new steers from creating these tasks. It does not repair historical rows: recovery requires a run binding or a missing original result transfer, and finalization cannot resolve an unbound follow-up.
Recover those active legacy tasks using the exact command identity shared by their MCP message and task IDs, then use the message's recorded run and its restart continuations. Reconcile the task, execution node, and turn item through persisted events, preserving the recorded terminal time. Reuse existing result transfers and completion acknowledgements. This clears both the Agents rows and the shared web/desktop/mobile background-work aggregation without age cutoffs, deleting history, or assigning an unrelated newer run's outcome.
Validation:
vp test run apps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.ts apps/server/src/orchestration-v2/ProjectionRecovery.test.ts apps/server/src/orchestration-v2/SubagentProjection.test.ts packages/client-runtime/src/state/threadExecution.test.ts apps/mobile/src/features/threads/threadAgentsPresentation.test.ts— 104 tests passed, including SQLite/memory recovery parity and nested-work coverage.vp run --filter t3 typecheckpassed. Targeted lint passed with two existing warnings outside changed lines. Normal pre-push format/lint gate passed.Read-only inspection found four stale historical registrations, each mapping exactly to a completed run. Public evidence uses synthetic fixtures; private chat screenshots and database contents are not included. No browser/device session was launched, and the running installation was not modified, restarted, or updated. This PR needs the normal maintainer release process before it can repair that installation's persisted state.
Model: GPT-6.1-Sol. Harness: Codex in T3 Code.