Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@marius-kilocode
Copy link
Collaborator

Summary

Fixes the issue where the model selection dropdown was not showing in resumed sessions in the Agent Manager.

Root Causes

Issue 1: Backend - Model not passed when resuming sessions

The resumeSession method in AgentManagerProvider.ts wasn't passing the model to spawnAgentWithCommonSetup, so when a session was resumed, the model information was lost.

Issue 2: Frontend - Remote sessions missing model field

The webview's RemoteSession interface was missing the last_model field that comes from the API. When selecting a remote session (before resuming), the model selector couldn't display the model because the field wasn't being mapped.

Changes

src/core/kilocode/agent-manager/AgentManagerProvider.ts

  • Added model: session.model to the parallel mode (worktree) resume path
  • Added model: session?.model to the non-parallel mode resume path

webview-ui/src/kilocode/agent-manager/state/atoms/sessions.ts

  • Added last_model?: string | null to the RemoteSession interface
  • Updated toAgentSession to map remote.last_model to model

Testing

  • All 51 backend tests pass
  • All 10 webview session atom tests pass
  • Manually verified that the model selector now shows correctly for resumed sessions

@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2026

🦋 Changeset detected

Latest commit: 5a67421

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@marius-kilocode marius-kilocode requested a review from a team January 22, 2026 11:49
@marius-kilocode marius-kilocode enabled auto-merge (squash) January 22, 2026 11:50
@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 22, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

This is a clean bug fix that correctly passes the model property when resuming sessions in the Agent Manager.

Changes Verified

  1. Backend (AgentManagerProvider.ts) - Passes session.model to spawnAgentWithCommonSetup() for both parallel and non-parallel mode session resumption. The method signature already supports the model option.

  2. Frontend (sessions.ts) - Adds last_model to RemoteSession interface and maps it to AgentSession.model using proper null handling (?? undefined).

Files Reviewed (3 files)
  • .changeset/fix-model-selection-resumed-sessions.md
  • src/core/kilocode/agent-manager/AgentManagerProvider.ts
  • webview-ui/src/kilocode/agent-manager/state/atoms/sessions.ts

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.

3 participants