Repository navigation
fix(agent-manager): show initial worktree prompts immediately - #13738
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Reviewed by grok-4.6 · Input: 415.6K · Output: 23.6K · Cached: 1.4M Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
September 3, 2026 10:46
iscekic
approved these changes
Sep 3, 2026
marius-kilocode
deleted the
investigate-worktree-creation-message-delay
branch
September 3, 2026 10:52
This was referenced Sep 6, 2026
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.
What Problem This Solves
After a new Agent Manager worktree is ready, the chat can show its empty screen until the backend returns the initial user message. The modal's first-send path bypasses the optimistic display already used by the normal composer.
Why This Change Was Made
Route prepared initial requests through the same optimistic message and submission handling as normal sends. Keep the existing request payload intact, including the target session/project, model, agent, reasoning variant, files, and browser feedback. Composer validation and setup/sandbox checks are unchanged.
Use one message ID for the pending bubble and backend request so confirmation updates the existing message rather than adding another one. When status events were missed while another project was active, completed history clears only the matching pending request. Ongoing tool turns and newer queued requests remain pending.
User Impact
Initial worktree prompts appear while they are being sent, rather than after backend preparation. Single-version and multi-version creation keep their existing routing. Creating a worktree without a prompt still leaves an empty conversation.
Evidence
main, 100 focused tests, extension build, typecheck, lint, unused-code checks, and the Kilo-only marker guard passed again.