Skip to content

feat(agent-manager): add fork action to completed sessions - #11063

Merged
marius-kilocode merged 3 commits into
mainfrom
chocolate-lunaria
Jun 10, 2026
Merged

feat(agent-manager): add fork action to completed sessions#11063
marius-kilocode merged 3 commits into
mainfrom
chocolate-lunaria

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Completed Agent Manager sessions only expose session forking through the tab context menu, which keeps a common follow-up action hidden even though the completed-session action row has room.

This adds a visible Fork Session action for writable, idle Agent Manager sessions with messages. It reuses the existing worktree-aware fork flow, remains absent from the narrower sidebar, and uses the Git-fork icon consistently with inline message and tab context-menu fork actions.

image image image

@kilo-code-bot

kilo-code-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The implementation is clean and well-scoped. A few notes worth calling out:

  • canFork status check is intentionally stricter than idle(): idle() (line 52) returns true for retry and offline states too (status !== "busy"), while canFork (line 191) uses session.status() === "idle" — this correctly prevents the fork button from appearing during transient retry/offline states.
  • Handler reuse is safe: handleForkSession(sessionId, messageId?) in AgentManagerApp.tsx is used for both onForkMessage and onForkSession. The optional messageId makes it compatible for both call sites without issue.
  • WorktreeModeProvider in the story: correctly simulates a non-sidebar (Agent Manager) context so isSidebar() returns false, making the fork button visible in the story.
  • Icon fix in sortable-tab.tsx: changing the context-menu fork item icon from branch to fork is a legitimate consistency fix, bringing it in line with the new action button and inline message fork.
Files Reviewed (5 files)
  • .changeset/fork-completed-agent-sessions.md
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/chat/chat-view-agent-manager-completed-chromium-linux.png
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/sortable-tab.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx

Reviewed by claude-4.6-sonnet-20260217 · 1,329,184 tokens

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 1a7cae4 into main Jun 10, 2026
25 of 27 checks passed
@marius-kilocode
marius-kilocode deleted the chocolate-lunaria branch June 10, 2026 10:52
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
feat(agent-manager): add fork action to completed sessions
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.

2 participants