diff --git a/.changeset/agent-manager-sidebar-density.md b/.changeset/agent-manager-sidebar-density.md
new file mode 100644
index 00000000000..08eb1cf9c18
--- /dev/null
+++ b/.changeset/agent-manager-sidebar-density.md
@@ -0,0 +1,5 @@
+---
+"kilo-code": patch
+---
+
+Fix the Agent Manager sidebar keyboard shortcut badge so it appears on the right edge of local rows and only while hovered or holding the jump modifier, give worktree titles more room by no longer reserving space for hidden row actions, align project names and section headings with the row icons below them, and show which worktree a session belongs to in the search palette.
diff --git a/.changeset/bright-model-search.md b/.changeset/bright-model-search.md
new file mode 100644
index 00000000000..6bdf91a54df
--- /dev/null
+++ b/.changeset/bright-model-search.md
@@ -0,0 +1,5 @@
+---
+"kilo-code": minor
+---
+
+Improve model search relevance with provider-aware results and personalized usage suggestions.
diff --git a/.changeset/bright-project-picker.md b/.changeset/bright-project-picker.md
new file mode 100644
index 00000000000..18458aaa856
--- /dev/null
+++ b/.changeset/bright-project-picker.md
@@ -0,0 +1,5 @@
+---
+"kilo-code": minor
+---
+
+Let Agent Manager users choose the repository when creating or importing a worktree in multi-project mode.
diff --git a/.changeset/cache-worktree-dialog-selections.md b/.changeset/cache-worktree-dialog-selections.md
new file mode 100644
index 00000000000..f13128f7b9c
--- /dev/null
+++ b/.changeset/cache-worktree-dialog-selections.md
@@ -0,0 +1,5 @@
+---
+"kilo-code": patch
+---
+
+Remember Agent Manager worktree dialog model, variant, mode, and sandbox selections when reopened.
diff --git a/.changeset/calm-agent-manager-git-polling.md b/.changeset/calm-agent-manager-git-polling.md
new file mode 100644
index 00000000000..5f3314267ab
--- /dev/null
+++ b/.changeset/calm-agent-manager-git-polling.md
@@ -0,0 +1,5 @@
+---
+"kilo-code": patch
+---
+
+Reduce Agent Manager background Git polling load across large worktree sets.
diff --git a/.changeset/calm-skill-examples.md b/.changeset/calm-skill-examples.md
new file mode 100644
index 00000000000..a1ac64ae30e
--- /dev/null
+++ b/.changeset/calm-skill-examples.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/cli": patch
+---
+
+Prevent built-in skill documentation examples from triggering shell permission prompts.
diff --git a/.changeset/fix-gh-windows-console.md b/.changeset/fix-gh-windows-console.md
new file mode 100644
index 00000000000..f9fc3a1e5cc
--- /dev/null
+++ b/.changeset/fix-gh-windows-console.md
@@ -0,0 +1,5 @@
+---
+"kilo-code": patch
+---
+
+Prevent extension-managed GitHub CLI commands from opening transient Windows Terminal windows.
diff --git a/.changeset/fix-interactive-terminal-input.md b/.changeset/fix-interactive-terminal-input.md
new file mode 100644
index 00000000000..b9d53915489
--- /dev/null
+++ b/.changeset/fix-interactive-terminal-input.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/cli": patch
+---
+
+Restore keyboard input for interactive terminal prompts when the CLI session uses a workspace.
diff --git a/.changeset/fix-multi-project-session-scope.md b/.changeset/fix-multi-project-session-scope.md
index d56c4c93018..0f32e3327ac 100644
--- a/.changeset/fix-multi-project-session-scope.md
+++ b/.changeset/fix-multi-project-session-scope.md
@@ -2,4 +2,4 @@
"kilo-code": patch
---
-Scope Agent Manager session events and Git status to the active project, including edits inside nested repositories.
+Speed up local VS Code snapshot installs and scope Agent Manager session events and Git status to the active project, including edits inside nested repositories.
diff --git a/.changeset/forked-subagent-resume.md b/.changeset/forked-subagent-resume.md
new file mode 100644
index 00000000000..2a4f8cd4837
--- /dev/null
+++ b/.changeset/forked-subagent-resume.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/cli": patch
+---
+
+Allow subagent tasks to be resumed after their parent session is forked.
diff --git a/.changeset/friendly-llamas-manage.md b/.changeset/friendly-llamas-manage.md
new file mode 100644
index 00000000000..494e5cc0658
--- /dev/null
+++ b/.changeset/friendly-llamas-manage.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/cli": patch
+---
+
+Support the Agent Manager tool with llama.cpp servers that reject prefix-only JSON Schema patterns.
diff --git a/.changeset/green-greps-settle.md b/.changeset/green-greps-settle.md
new file mode 100644
index 00000000000..9f7cacabf79
--- /dev/null
+++ b/.changeset/green-greps-settle.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/cli": patch
+---
+
+Add bounded, context-aware grep controls without leaving agents waiting on completed searches.
diff --git a/.changeset/jetbrains-cli-mode-visibility.md b/.changeset/jetbrains-cli-mode-visibility.md
new file mode 100644
index 00000000000..bc9cf774d13
--- /dev/null
+++ b/.changeset/jetbrains-cli-mode-visibility.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/kilo-jetbrains": minor
+---
+
+Log whether the JetBrains plugin downloads Core or uses the bundled/cached version, and mark the Core version shown in the popup as "Bundled" when it wasn't downloaded.
diff --git a/.changeset/jetbrains-revert-diff-card.md b/.changeset/jetbrains-revert-diff-card.md
new file mode 100644
index 00000000000..fe8f75e3d3b
--- /dev/null
+++ b/.changeset/jetbrains-revert-diff-card.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/kilo-jetbrains": patch
+---
+
+Improve JetBrains session transcript layout, icons, reverted-change summaries, and multi-hunk diff rendering.
diff --git a/.changeset/jetbrains-slash-completion.md b/.changeset/jetbrains-slash-completion.md
new file mode 100644
index 00000000000..e2ec3c49969
--- /dev/null
+++ b/.changeset/jetbrains-slash-completion.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/kilo-jetbrains": patch
+---
+
+Improve slash command completion to match separators, camel-case humps, and contained command names.
diff --git a/.changeset/opencode-v1-17-9-to-v1-17-13.md b/.changeset/opencode-v1-17-9-to-v1-17-13.md
index df1deffa15f..529fce727e5 100644
--- a/.changeset/opencode-v1-17-9-to-v1-17-13.md
+++ b/.changeset/opencode-v1-17-9-to-v1-17-13.md
@@ -5,11 +5,7 @@
Changes from opencode v1.17.9 to v1.17.13 upstream:
-- Core Improvements: Sessions gain a snapshot and revert system for staging, clearing and committing file reverts.
-- Core Improvements: Durable session history is served in finite pages and exposed through the SDK.
- Core Improvements: MCP servers can append their instructions to the model context, and MCP resources are available as tools with template listing.
-- Core Improvements: MCP tools use the `mcp__server__tool` naming convention, with legacy names still accepted.
-- Core Improvements: Plugins can use the v2 effect host and a namespaced hook API.
- Core Improvements: Model variants are generated from models.dev data, including modes exposed as models.
- Core Improvements: Tool definitions pass `strict` through for Codex parity, and Gemini requests support video and audio media.
- Core Bugfixes: Interrupted assistant steps settle instead of leaving sessions stuck busy.
@@ -18,8 +14,8 @@ Changes from opencode v1.17.9 to v1.17.13 upstream:
- Core Bugfixes: Stale GitHub Copilot Responses item IDs are no longer replayed, and OpenAI reasoning variants are forced where required.
- Core Bugfixes: Adaptive thinking is enabled for Claude Sonnet 5, and expired promos were removed from the zen catalog.
- Core Bugfixes: Preserve released prompt history during database replay and keep native event streams connected for all supported Kilo events.
-- Core Bugfixes: Remote skills refresh atomically with version pinning, and skill base directories are emitted as filesystem paths.
-- CLI Improvements: `kilo run --mini` provides a compact interactive mode, and ports increment from the default when busy.
+- Core Bugfixes: Remote skill manifests support optional per-skill versions; changing a version refreshes the cached skill atomically, and skill base directories are emitted as filesystem paths.
+- CLI Improvements: Ports increment from the default when busy.
- CLI Improvements: Use `--auto` to start the TUI in a run-scoped auto-approve mode, and leave the mode mid-session from the command palette.
-- TUI Improvements: Redesigned crash screen, model picker sorted by release date, a diff viewer keybind, main-branch diff source, bindable move-session command, and inline skill load errors.
+- TUI Improvements: Redesigned crash screen, model picker sorted by release date, bindable diff viewer and Move Session commands, main-branch diff source, and inline skill load errors.
- TUI Bugfixes: File autocomplete is scoped to the session, multi-day durations format correctly, and root sessions load in the session switcher.
diff --git a/.changeset/privacy-mode-tui.md b/.changeset/privacy-mode-tui.md
new file mode 100644
index 00000000000..9131915a7e9
--- /dev/null
+++ b/.changeset/privacy-mode-tui.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/cli": patch
+---
+
+Add a privacy mode that blurs PII in the TUI (personal balance, Kilo Pass usage, etc.) and requires confirmation before `/profile` reveals email, name, balance, and team. Toggle with the new `/privacy` command or by setting `privacy_mode` in `kilo.json`. The `kilo profile` CLI command is unaffected.
\ No newline at end of file
diff --git a/.changeset/quick-git-launches.md b/.changeset/quick-git-launches.md
new file mode 100644
index 00000000000..6c29101ce1f
--- /dev/null
+++ b/.changeset/quick-git-launches.md
@@ -0,0 +1,5 @@
+---
+"kilo-code": patch
+---
+
+Reduce Agent Manager Git polling overhead by reusing the validated Git executable and bypassing the macOS developer-tool launcher when safe.
diff --git a/.changeset/quiet-embedded-logo.md b/.changeset/quiet-embedded-logo.md
new file mode 100644
index 00000000000..7623cf0e739
--- /dev/null
+++ b/.changeset/quiet-embedded-logo.md
@@ -0,0 +1,5 @@
+---
+"kilo-code": patch
+---
+
+Use a compatible Kilo wordmark in embedded Agent Manager terminals.
diff --git a/.changeset/quiet-jetbrains-watchers.md b/.changeset/quiet-jetbrains-watchers.md
new file mode 100644
index 00000000000..3e07e6c6981
--- /dev/null
+++ b/.changeset/quiet-jetbrains-watchers.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/cli": patch
+---
+
+Fix high CPU and runaway memory growth in the JetBrains background `kilo serve` process on macOS by no longer eagerly starting native file watchers, matching the VS Code backend.
diff --git a/.changeset/quiet-tui-config-reloads.md b/.changeset/quiet-tui-config-reloads.md
new file mode 100644
index 00000000000..8c21c818bb9
--- /dev/null
+++ b/.changeset/quiet-tui-config-reloads.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/cli": patch
+---
+
+Prevent TUI config reload logs from corrupting the interactive terminal.
diff --git a/.changeset/safe-credential-reconciliation.md b/.changeset/safe-credential-reconciliation.md
new file mode 100644
index 00000000000..abb8dd5f36a
--- /dev/null
+++ b/.changeset/safe-credential-reconciliation.md
@@ -0,0 +1,5 @@
+---
+"@kilocode/cli": patch
+---
+
+Prevent concurrent Kilo startups from rewriting unchanged credentials, retry transient database locks, and redact bound values from database errors.
diff --git a/.changeset/sync-inspector-width.md b/.changeset/sync-inspector-width.md
index 02eeb4e7239..9372f7ace4b 100644
--- a/.changeset/sync-inspector-width.md
+++ b/.changeset/sync-inspector-width.md
@@ -2,4 +2,4 @@
"kilo-code": patch
---
-Persist the Agent Manager inspector width and share it between the terminal and diff viewer.
+Persist the Agent Manager inspector width, share it between the terminal and diff viewer, and keep resizing responsive.
diff --git a/.kilo/plans/agent-manager-multi-project-sidebar-density.md b/.kilo/plans/agent-manager-multi-project-sidebar-density.md
new file mode 100644
index 00000000000..28790c6a3bf
--- /dev/null
+++ b/.kilo/plans/agent-manager-multi-project-sidebar-density.md
@@ -0,0 +1,437 @@
+# Plan: Agent Manager sidebar — shortcut badge fix + reclaim title width
+
+Worktree: `/Users/marius/Documents/git/kilocode/.kilo/worktrees/mewing-profit`
+All paths below are relative to `packages/kilo-vscode/`.
+
+Rules:
+
+- Do exactly these edits. Do not refactor anything else.
+- Solid.js, not React: `class=`, not `className=`.
+- Do **not** add `kilocode_change` markers. This package is Kilo-owned and CI fails if you do.
+- Do **not** add new i18n strings. None are needed.
+- Out of scope: the per-project `SESSIONS` list in the tree (tracked in
+ https://github.com/Kilo-Org/kilocode/issues/12928). Do not touch `UnassignedSessionsSection.tsx`.
+
+Do task A, verify, then task B, verify, then task C.
+
+## Task A — Shortcut badge on the right, hidden until hover or ⌘ held
+
+The `⌘1` badge on "local" rows is always visible, and in multi-project mode it renders on the
+*left*, between the icon and the label. Worktree rows already behave correctly. Cause:
+`.am-shortcut-badge` has no default `opacity: 0` — worktree badges are only hidden because their
+container `.am-wt-hover-actions` is hidden, and local rows never got that container.
+
+### A1 — `webview-ui/agent-manager/ProjectSidebarBody.tsx`
+
+Replace the whole `
+```
+
+The `−` in `am-stat-deletions` is U+2212 MINUS SIGN, not a hyphen. Copy it verbatim.
+
+### A2 — `webview-ui/agent-manager/SidebarBody.tsx`
+
+Same bug in legacy single-project mode, but the badge is already last, so only the wrapper is
+missing.
+
+Insert **before** line **127** (``):
+
+```tsx
+
+```
+
+Result: one `am-wt-actions-cell` div containing the skeleton ``, the stats ``, and the
+hover-actions div, closing before ``. Prettier fixes indentation in task D.
+
+### A3 — `webview-ui/agent-manager/agent-manager.css`
+
+Delete lines **569-575** and replace with the rule that actually works:
+
+```css
+.am-local-item .am-shortcut-badge {
+ right: 8px;
+}
+
+.am-local-item:hover .am-shortcut-badge {
+ opacity: 1;
+}
+```
+
+becomes:
+
+```css
+.am-local-item:hover .am-wt-hover-actions {
+ opacity: 1;
+ visibility: visible;
+}
+```
+
+(`right: 8px` never applied — the badge is `position: static`. The `opacity: 1` never did anything
+because nothing set `opacity: 0` first.)
+
+### A4 — same file, delete lines **609-611** entirely, add nothing:
+
+```css
+.am-show-shortcuts .am-local-item .am-shortcut-badge {
+ opacity: 1;
+}
+```
+
+The rule at lines 597-600 is not scoped to worktree items, so after A1/A2 it already covers local
+rows.
+
+### A5 — same file, lines **986-989**, add `visibility: hidden` to match worktree behaviour:
+
+```css
+.am-local-item:hover .am-worktree-stats,
+.am-local-item:hover .am-worktree-stats-skeleton {
+ opacity: 0;
+ visibility: hidden;
+}
+```
+
+### Verify A
+
+```bash
+cd packages/kilo-vscode && bun run typecheck && bun run lint
+```
+
+## Task B — Stop reserving width for invisible content
+
+`.am-wt-actions-cell` is a grid whose children all stack in cell 1/1, so the cell is permanently as
+wide as its widest child. `visibility: hidden` does not remove layout, so the invisible hover
+actions (~42px) and the loading skeleton (~48px) reserve width on every row forever. That is why
+titles truncate ~40px before the right edge.
+
+All edits in `webview-ui/agent-manager/agent-manager.css`.
+
+### B1 — Take hover actions out of grid flow
+
+Lines **475-482**. Add the four `position` lines at the top, keep everything else:
+
+```css
+.am-wt-hover-actions {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ gap: 2px;
+ opacity: 0;
+ visibility: hidden;
+}
+```
+
+Absolutely positioned children never size grid tracks. `.am-wt-actions-cell` is already
+`position: relative` (line 464). Do not edit the `.am-wt-actions-cell > *` rule at lines 469-472.
+
+### B2 — Same for the loading skeleton
+
+Add immediately after the rule from B1:
+
+```css
+/* Skeleton is a placeholder, not real content — it must not reserve title width. */
+.am-wt-actions-cell > .am-worktree-stats-skeleton {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+}
+```
+
+Do not edit the base `.am-worktree-stats-skeleton` rule (lines 744-748) or `.am-pr-badge-skeleton`.
+
+After B1+B2 the cell is sized only by `.am-worktree-stats` and `.am-worktree-delete-hint`, which
+are the only things that should reserve space.
+
+### B3 — Fade the title under the overlaying actions
+
+The actions now overlay the row instead of sitting in reserved space, so a long title would render
+behind them. Same fix the codebase already uses for the local branch at lines 577-580. Add after
+B2:
+
+```css
+.am-worktree-item:hover .am-worktree-branch {
+ mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
+ -webkit-mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
+}
+```
+
+### B4 — Remove one layer of nested padding
+
+Lines **365-370**, change `padding: 0 6px;` to `padding: 0;`:
+
+```css
+.am-project-body {
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+ padding: 0;
+}
+```
+
+Gains 6px per side on every row in a project. Rows keep their own 10px inset
+(`.am-local-item` line 106, `.am-worktree-item` line 425) so they stay indented under the project
+header. Do not change those, and leave `.am-project-body .am-section-header` (lines 273-275) alone.
+
+### B5 — Remove the remaining outer list gutters in multi-project mode
+
+The sidebar keeps 8px horizontal padding for the header controls, but the project list should use
+the full width up to its scrollbar. In the same CSS file, extend `.am-projects-list` with:
+
+```css
+.am-projects-list {
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+ overflow-y: auto;
+ margin-inline: -8px;
+}
+```
+
+Do not remove padding from `.am-sidebar` itself. This makes project cards and rows reach the
+scrollbar without moving the `PROJECTS` header and its controls to the edge.
+
+### Verify B
+
+```bash
+cd packages/kilo-vscode && bun run typecheck && bun run lint
+```
+
+## Task C — Show where a palette session lives
+
+In the ⌘F search palette, multi-project session results show only the project name, so you cannot
+tell whether a session is in a worktree or at the project root.
+
+File: `webview-ui/agent-manager/ProjectList.tsx`. In the session loop (lines **90-106**), add the
+two `const` lines and change `meta` and `search`:
+
+```tsx
+ for (const session of props.sessions[project.id] ?? []) {
+ const wt = session.worktreeId ? state.worktrees.find((item) => item.id === session.worktreeId) : undefined
+ const where = wt ? wt.label || wt.branch : props.t("agentManager.local")
+ items.push({
+ key: `${project.id}:session:${session.id}`,
+ projectId: project.id,
+ kind: "session",
+ group: "sessions",
+ title: session.title || props.t("agentManager.session.untitled"),
+ meta: [project.label, where],
+ search: [project.label, where, wt?.branch, session.title, session.id].filter(Boolean).join(" "),
+ updatedAt: session.updatedAt,
+ state: "idle",
+ visible: project.expanded,
+ sessionId: session.id,
+ location: session.worktreeId ? "worktree" : "local",
+ worktreeId: session.worktreeId ?? undefined,
+ })
+ }
+```
+
+`state` is already in scope (line 55) and already null-checked (line 56). `meta` is joined with
+` · ` by the renderer (`SidebarSearchMenu.tsx:143`), so no separator work is needed.
+
+## Task E — Align the project heading with the row icons
+
+Every row in the projects tree used a different left inset, which made the sidebar look busy and
+indented for no reason. Measured against a full-bleed `.am-projects-list` (starting at x=0):
+
+| Element | Before | After |
+|---|---|---|
+| `PROJECTS` label | 16px | 10px |
+| Project chevron | 12px | 10px |
+| `WORKTREES` / `SESSIONS` label | 6px | 10px |
+| `.am-local-item` icon | 10px | 10px |
+| `.am-worktree-item` icon | 10px | 10px |
+
+Changes in `agent-manager.css`:
+
+- `.am-local-item` padding `8px 10px` → `8px 6px`
+- `.am-worktree-item` padding `6px 10px` → `6px 6px`
+- `.am-project-item` padding `6px 8px 6px 12px` → `6px 6px`
+- `.am-project-body .am-section-header` padding-left `6px` → unchanged at `6px`
+- `.am-projects > .am-section-header` gets `padding-left: 2px`, because that heading sits inside
+ `.am-sidebar`'s own 8px padding rather than in the pulled-out list
+
+The leading columns carry no padding of their own (`.am-sidebar-header-toggle` and
+`.am-sidebar-header-chevron` are bare 16px boxes), so row padding is the only lever.
+
+### Symmetric gutter
+
+`.am-projects-list` uses `margin-left: -4px; margin-right: -4px`, pulling out of `.am-sidebar`'s
+8px padding to an even 4px gutter. An earlier attempt used `-8px` on the left for true full bleed,
+but that is wrong twice over: the resize handle's inner half then covered every card, so card
+clicks started a resize, and a selected row's `border-radius: var(--radius-sm)` background clipped
+flat against the window edge while still being inset on the right, which read as a bar bleeding off
+the sidebar rather than a card.
+
+4px is also the most reclaimable on the right. The handle's hit area is 8px wide centered on the
+border, reaching 5px back into the content area (255-263 in a 260px sidebar). At this gutter the
+row's hover actions end at 249, leaving 6px of clearance; anything tighter puts row buttons under
+the handle and turns clicks into resize drags.
+
+### Two tab stops
+
+Reducing the insets exposed that labels sat at four different offsets: the non-collapsible
+`WORKTREES` heading at 6px (it passes no `onToggle`, so `SidebarSectionHeader` renders no chevron),
+collapsible headings at 28px, worktree card text at 30px, and local card text at 32px because
+`.am-local-icon` was 18px wide while `.am-wt-icon` held a 16px glyph.
+
+Normalized to one 16px leading column with an 8px gap, giving exactly two tab stops:
+
+- `.am-sidebar-header-main` gap `6px` → `8px`, matching the card icon gap
+- new `.am-project-body .am-sidebar-header:not(.am-sidebar-header-toggleable) .am-sidebar-header-main { padding-left: 24px }`
+ so a heading with no chevron still reserves the column
+- `.am-local-icon` `18px` → `16px`
+- `.am-wt-icon` gains `width: 16px` and `justify-content: center`
+
+Measured result at 260px:
+
+| Tab stop | Elements |
+|---|---|
+| 10px | `PROJECTS` label, project chevron, local icon, worktree icon, `SESSIONS` chevron |
+| 34px | project name, `WORKTREES` label, `SESSIONS` label, local text, worktree text |
+
+```
+cardLeftGap=4 | cardRightGap=4 | actionsRight=249 | handleZoneFrom=255
+```
+
+`PROJECTS` intentionally stays at the 10px glyph stop rather than being pushed to 34px: it is the
+root heading, so indenting it further than the projects beneath it would invert the hierarchy.
+
+### Rejected: a per-project icon in the heading
+
+Superset shows a GitHub **owner** avatar per project (`https://github.com/{owner}.png?size=64`,
+falling back to the project's initial). Our webview CSP already allows `https:` images, so it was
+feasible, but it does not fit this repo set: of the local projects, ~17 are `Kilo-Org` remotes and
+would share one identical Kilo logo, and ~20 have no git remote at all and would show nothing.
+An owner avatar answers "who owns this", which is not the question the sidebar needs answered.
+Superset's repo-file scanner (`favicon-discovery.ts`) is dead code there, so it was not an option
+worth copying either. Left out entirely as out of scope.
+
+## Task D — Final checks
+
+From `packages/kilo-vscode`:
+
+```bash
+bun run format
+bun run typecheck
+bun run lint
+bun run test:unit
+bun run check-kilocode-change
+bun run compile
+```
+
+Then create `.changeset/agent-manager-sidebar-density.md`:
+
+```md
+---
+"kilo-code": patch
+---
+
+Fix the Agent Manager sidebar keyboard shortcut badge so it appears on the right edge of local rows and only while hovered or holding the jump modifier, give worktree titles more room by no longer reserving space for hidden row actions, and show which worktree a session belongs to in the search palette.
+```
+
+## Visual regression baselines
+
+Task A and B change existing snapshots: `WorktreeItemDefault`, `WorktreeItemActive`,
+`WorktreeItemPendingDelete`, `WorktreeItemStale`, `WorktreeItemWithStats`, `WorktreeItemGrouped`,
+`SidebarSearchOpen`, `MultiProjectSidebar` in `webview-ui/src/stories/agent-manager.stories.tsx`.
+
+**Do not run or update visual regression tests.** `tests/visual-regression.spec.ts` is skipped on
+macOS, so you cannot produce valid Linux baselines locally. CI regenerates them and may push a
+baseline commit. If a push is then rejected, do **not** `git pull --rebase`; run
+`git fetch && git push --force-with-lease`.
+
+## Manual test
+
+Enable `kilo-code.new.experimental.multiProject` in Kilo Settings → Experimental, add a second
+project, open Agent Manager (`Cmd+Shift+M`).
+
+1. Nothing hovered: no `⌘N` badge visible anywhere.
+2. Hover a `local` row: badge appears at the **right** edge, git stats fade out.
+3. Hold ⌘: badges appear on all local and worktree rows, all right-aligned. Release: all gone.
+4. Worktree rows with no git changes show noticeably longer titles than before. Hover one with a
+ long title: it fades under the badge and trash button instead of colliding.
+5. ⌘F: session results read ` · `.
+6. Turn the experimental setting off: the `local` row's `⌘1` badge is hidden until hover.
+
+## Known issue, not fixed here
+
+`⌘1`–`⌘9` index the full nav order, which includes session rows that render no badge
+(`navigate.ts:214-218` + `section-helpers.ts:147-153`). So with 4 worktrees you see `⌘1`–`⌘5` and
+`⌘6`–`⌘9` silently land on unlabelled session rows. Deliberately left alone: fixing it means
+changing jump semantics and rewriting `tests/unit/navigate.test.ts:745-757`, and it becomes moot
+once #12928 moves sessions out of the tree.
diff --git a/.kilo/plans/agent-manager-new-worktree-project-selector.md b/.kilo/plans/agent-manager-new-worktree-project-selector.md
new file mode 100644
index 00000000000..5f98fd086f7
--- /dev/null
+++ b/.kilo/plans/agent-manager-new-worktree-project-selector.md
@@ -0,0 +1,834 @@
+# Agent Manager — New Worktree Project Selector
+
+Status: implemented 2026-08-06. The implementation is uncommitted.
+
+This is Slice 4 item 6 ("Add project-aware New Worktree targeting") from
+`agent-manager-multi-project-uniform-ui.md`, the last unimplemented item of that slice.
+`agent-manager-multi-project-runtime.md:29` deferred it out of the backend-first scope.
+Everything the extension side needs already exists; this is almost entirely a webview
+change.
+
+Implementation notes:
+
+- The project catalog is passed into the dialog as an accessor so the picker reflects
+ registry changes while it remains open.
+- The per-project default-base resolver returns `undefined` when the project has no
+ configured/local branch, allowing the backend-detected branch response to remain the
+ fallback instead of being replaced by a hardcoded `main`.
+- Branch, import-result, and worktree-ready messages carry `projectId` in multi-project
+ mode, which makes fast project changes and cross-project creation activation safe.
+- The slash-command hook accepts optional caller-owned commands; `/project` is scoped to
+ this dialog and is hidden when multi-project mode is unavailable.
+
+---
+
+## Problem
+
+With `kilo-code.new.experimental.multiProject` enabled, the New Worktree dialog has no
+notion of which repository it targets, and the user cannot see or change it.
+
+`Cmd+N` opens the dialog with no project at all:
+
+```tsx
+// AgentManagerApp.tsx:1870-1876
+const showNewWorktreeDialog = () => {
+ if (!loaded()) return
+ expandSidebar()
+ dialog.show(() => (
+ dialog.close()} defaultBaseBranch={repoDefaultBranch()} />
+ ))
+}
+```
+
+`projectId` is `undefined`, so every message the dialog sends omits it
+(`agentManager.requestBranches` at `NewWorktreeDialog.tsx:321`,
+`agentManager.createMultiVersion` at `:373`, `agentManager.importFromPR` at `:566`,
+`agentManager.importFromBranch` at `:575`). The extension then silently falls back to the
+active project in `messageProject()` (`AgentManagerProvider.ts:474`) before running the
+message inside `ProjectScope`.
+
+The result is correct but opaque:
+
+- The dialog never shows which repository the worktree lands in.
+- The only way to target a specific project is the per-project `+` button
+ (`ProjectList.tsx:136-146`), which does pass `projectId` explicitly.
+- `defaultBaseBranch` is resolved from the *active* project
+ (`AgentManagerApp.tsx:261,272`), so even Advanced options' base-branch list and default
+ badge are implicitly single-project.
+
+The desired behavior, per the original request: the dialog should show the assigned
+project and let the user change it. Defaulting to the last selected project is fine as a
+default; it just must be visible and overridable.
+
+---
+
+## Design decisions
+
+### Placement: inline with the tab switcher
+
+The selector renders inside the New/Import pill row (`NewWorktreeDialog.tsx:620-699`),
+right-aligned with a constrained width, so it is shared by both tabs without adding a
+full-width form row.
+
+```
+┌─ New Worktree ──────────────────────────────┐
+│ [ New ] [ Import ] [ folder kilocode ▾ ] │ ← inline, multiProject only
+│ [ Worktree name (optional) ] │
+│ [ prompt … ] Code ▾ GPT-5.6 ▾ None ▾ │
+│ › Advanced options │
+│ VERSIONS 1 2 3 4 ⧉ Compare Models │
+│ [ Create Worktree ] │
+└──────────────────────────────────────────────┘
+```
+
+Rejected alternatives and why:
+
+- **Inside Advanced options.** Wrong category. Advanced options holds refinements of a
+ known target (branch name, base branch). The project *is* the target: changing it
+ invalidates the branch list, base branch, default-branch badge, and setup scripts.
+ Hiding it also fails the stated requirement of seeing which project is assigned.
+- **A full-width row directly beneath the tabs.** It covered both tabs, but consumed
+ unnecessary vertical space and made the project control look like a primary form field.
+- **In the dialog title** (`New Worktree in [kilocode ▾]`). Reads nicely but requires
+ widening `Dialog`'s `title` prop to accept JSX, which touches kilo-ui for one caller.
+
+### Visibility
+
+Render the row only when `multiProject` is true. With the flag off (the default) the
+dialog stays byte-identical to today, so there is no regression surface for the
+all-user path. When the flag is on but only the pinned project exists, still render it:
+showing the target is informative and the requirement is explicitly about seeing the
+assignment.
+
+### Default value
+
+`props.projectId ?? activeProjectId()`. `activeProjectId()` already exists at
+`AgentManagerApp.tsx:268` (`projectList().find((p) => p.active)?.id ?? currentProjectId()`).
+
+No new persistence. The active project is already the durable "last selected" state
+(persisted per project as `activeTarget` in each repo's `.kilo/agent-manager.json`, plus
+the registry's ordering). Adding a separate "last dialog project" key would create a
+second source of truth that can disagree with the sidebar.
+
+### Reuse, no new CSS
+
+The row uses the existing `am-advanced-field` + `am-nv-config-label` +
+`am-selector-wrapper` + `am-selector-trigger` markup, i.e. exactly the structure the base
+branch selector already uses at `NewWorktreeDialog.tsx:813-905`, with `DeferredPopover`
+(already imported) instead of `BranchSelectPopover`.
+
+### Component extraction
+
+`NewWorktreeDialog.tsx` is already 1136 lines. The selector and its popover list go into a
+new `webview-ui/agent-manager/ProjectSelect.tsx` (roughly `BranchSelect.tsx`'s role):
+presentational, takes `projects`, `value`, `onSelect`, and labels, and owns nothing but
+its own list rendering. The dialog keeps only the signal, the popover trigger, and the
+effects.
+
+Note: `webview-ui/agent-manager/NewWorktreeDialog.tsx` is not under a `maxLines` cap
+(`tests/unit/agent-manager-arch.test.ts` caps `src/agent-manager/*.ts` only), but the file
+is on the arch test's watched list and the caps exist to discourage exactly this kind of
+growth.
+
+---
+
+## Changes
+
+### 1. `webview-ui/agent-manager/ProjectSelect.tsx` (new)
+
+Presentational popover body listing projects:
+
+- Row = project label + dimmed root path (tooltip on the full root, matching
+ `ProjectsSection.tsx:60`).
+- Check mark on the selected project.
+- Untrusted and missing projects are disabled and carry the same affordances the accordion
+ uses: `lock` icon + trust hint, `warning` icon + missing hint
+ (`ProjectsSection.tsx:67-75`). Selecting them is not possible; trust happens in the
+ sidebar, not in this dialog. Keeps the dialog free of trust-flow branching.
+- There is intentionally no Add project action in this picker. Project registration and
+ trust management stay in the Agent Manager Projects toolbar.
+
+### 2. `webview-ui/agent-manager/NewWorktreeDialog.tsx`
+
+Props change:
+
+```ts
+export const NewWorktreeDialog: Component<{
+ onClose: () => void
+ projectId?: string // now: initial value, not fixed target
+ projects?: AgentProjectSnapshot[] // omitted / empty => single-project, row hidden
+ activeProjectId?: string
+ defaultBase?: (projectId: string) => string // replaces defaultBaseBranch?: string
+ mode: ModeRouter
+}>
+```
+
+`defaultBaseBranch?: string` must become a per-project lookup because each project has its
+own configured default and its own local branch. `ProjectList.tsx:142` already computes
+that expression (`state?.defaultBaseBranch ?? props.local[projectId]?.branch`); hoist it
+into the callback so both call sites share it.
+
+New state and derived values:
+
+```ts
+const [project, setProject] = createSignal(props.projectId ?? props.activeProjectId)
+const [projectOpen, setProjectOpen] = createSignal(false)
+const selectable = () => (props.projects ?? []).filter((p) => p.trusted && !p.missing)
+const showProject = () => (props.projects?.length ?? 0) > 0
+```
+
+Every outbound message switches from `props.projectId` to `project()`:
+`:321` `requestBranches`, `:373` `createMultiVersion`, `:566` `importFromPR`,
+`:575` `importFromBranch`.
+
+Reload branch data on project change, replacing the one-shot `onMount` request at `:319-321`:
+
+```ts
+createEffect(
+ on(project, (id) => {
+ setBranches([])
+ setBranchSearch("")
+ setHighlightedIndex(0)
+ setBaseBranch(null) // custom base is project-specific
+ setDefaultBranch(props.defaultBase?.(id) ?? "main")
+ setBranchesLoading(true)
+ vscode.postMessage({ type: "agentManager.requestBranches", projectId: id })
+ }),
+)
+```
+
+Drop stale branch replies in the `agentManager.branches` handler (`:520-525`).
+`AgentManagerBranchesMessage` **already declares an optional `projectId`**
+(`extension-messages.ts:939-945`, `src/agent-manager/types.ts:293-298`); the field is
+simply never populated or read today. Without this guard, switching projects twice quickly
+can race a wrong branch list into the base-branch popover:
+
+```ts
+if (ev.projectId && ev.projectId !== project()) return
+```
+
+Also replace the `if (!props.defaultBaseBranch) setDefaultBranch(ev.defaultBranch)` guard
+at `:523` — with a per-project lookup, the guard must consult
+`props.defaultBase?.(project())` instead of a fixed prop.
+
+Preserved across a project change (all project-agnostic): prompt text and its
+`advancedDialogPrompt` persistence, images, name, agent, model, variant, versions, compare
+allocations, sandbox override.
+
+Keyboard: add `project` to `WORKTREE_PROMPT_COMMANDS` so `/project` opens the popover,
+consistent with mode/model/variant/sandbox already being reachable from the dialog's slash
+menu (`:302-314`). Hide it from the list when `showProject()` is false, using the same
+`hidden` set mechanism already used for `agents` / `variant` / `sandbox`.
+
+### 3. `webview-ui/agent-manager/AgentManagerApp.tsx`
+
+`showNewWorktreeDialog` (`:1870-1876`) passes the catalog and a per-project default
+resolver instead of a single branch string:
+
+```tsx
+ dialog.close()}
+ projects={multiProject() ? projectList() : undefined}
+ activeProjectId={activeProjectId()}
+ defaultBase={defaultBase}
+/>
+```
+
+where `defaultBase(id)` reads `registry.ensure(id).defaultBaseBranch() ?? registry.ensure(id).localStats()?.branch ?? repoDetectedBranch() ?? "main"`.
+`registry.ensure` and both store fields already exist
+(`project/registry.ts:39`, `project/store.ts:62,67,113,123`).
+
+### 4. `webview-ui/agent-manager/ProjectList.tsx`
+
+`newWorktree(projectId)` (`:136-146`) passes the same `projects` / `activeProjectId` /
+`defaultBase` props with `projectId` as the initial value, so the per-project `+` button
+opens the dialog pre-scoped but still switchable. Its current inline
+`state?.defaultBaseBranch ?? props.local[projectId]?.branch` expression is replaced by the
+shared resolver passed down from `AgentManagerApp`.
+
+### 5. `src/agent-manager/worktree-importer.ts`
+
+Stamp `projectId` on all three `agentManager.branches` posts (`:27`, `:48`, `:54`). The
+field is already in the type; the value is available from the ambient `ProjectScope`
+context the message runs in (`AgentManagerProvider.ts:479`). Without this the stale-reply
+guard in the webview is inert.
+
+### 6. Activate the created worktree when the project differs
+
+Creating in a non-active project currently leaves the sidebar where it is:
+`createMultiVersion` never activates (no activation call in `provider-multi-version.ts`),
+and the new worktree just appears in that project's accordion. That is right for the
+per-project `+` button, but for `Cmd+N` where the user deliberately switched projects,
+landing in the new worktree is what the flow implies.
+
+Post an `agentManager.activateSelection` for the first created worktree when the chosen
+project differs from the active one. `activateSelection` already handles readiness, trust,
+and stale-target fallback (`project/messages.ts:76-99`), so this is one message, not new
+machinery. Hook it to the existing `agentManager.worktreeSetup` / `multiVersionProgress`
+handling in `AgentManagerApp.tsx:1453-1471`, which already carries `projectId`.
+
+### 7. i18n
+
+New keys in `webview-ui/agent-manager/i18n/en.ts` (near the existing
+`agentManager.dialog.*` block at `:130`):
+
+- `agentManager.dialog.project.select` — "Select project"
+- `agentManager.dialog.project.untrusted` — "Trust this project in the sidebar first"
+- `agentManager.dialog.project.missing` — "Repository not found"
+
+Then translate the four keys into the other 20 locale files in that directory via the
+`translator` subagent.
+
+---
+
+## Implementation order
+
+1. `ProjectSelect.tsx` with the presentational list, plus i18n keys in `en.ts`.
+2. Dialog: `project` signal, prop rename to `defaultBase`, route all four outbound
+ messages through `project()`, render the row behind `showProject()`.
+3. Dialog: `createEffect(on(project, …))` branch reload, base-branch reset, stale-reply
+ guard.
+4. Call-site updates in `AgentManagerApp.tsx` and `ProjectList.tsx`, shared `defaultBase`
+ resolver.
+5. `projectId` stamp in `worktree-importer.ts`.
+6. `/project` slash command.
+7. Post-create activation when the target project differs.
+8. Locale fan-out.
+9. Changeset (`minor`, user-facing): worktree creation targets an explicit project.
+
+---
+
+## Tests
+
+Existing source-text unit tests already assert against this dialog and will need to stay
+green: `tests/unit/new-worktree-dialog-sandbox.test.ts`,
+`tests/unit/prompt-input-bidirectional.test.ts`, and the dialog entry in
+`tests/unit/agent-manager-arch.test.ts`.
+
+New coverage:
+
+- The dialog posts `createMultiVersion` / `requestBranches` / `importFromBranch` /
+ `importFromPR` with the *selected* project id, not the prop, after a project change.
+- A `agentManager.branches` reply carrying a non-current `projectId` does not mutate the
+ branch list (the race guard).
+- Changing project clears `baseBranch` and re-derives `defaultBranch` from `defaultBase`.
+- Prompt text survives a project change (no accidental reset through the shared
+ `advancedDialogPrompt` cache).
+- The row does not render when `projects` is empty, so the single-project dialog is
+ unchanged.
+- Untrusted and missing projects are not selectable.
+
+Checks to run before declaring done, from `packages/kilo-vscode/`:
+`bun run typecheck`, `bun run lint`, `bun run test:unit`, `bun run knip`.
+
+---
+
+## Manual verification
+
+In the isolated harness (`bun run extension:isolated`) with
+`kilo-code.new.experimental.multiProject` enabled and two repositories registered:
+
+1. `Cmd+N` from project A shows "Project: A". Switch to B, create, and confirm the
+ worktree lands in B's accordion and the sidebar activates it.
+2. Switch project with Advanced options open and confirm the base-branch list and default
+ badge follow the new project rather than showing A's branches.
+3. Switch project rapidly back and forth and confirm the branch list matches the selected
+ project (the race guard).
+4. Type a prompt, switch project, confirm the prompt is retained.
+5. Use the Import tab after switching project and confirm branches and PR import target
+ the selected repository.
+6. Turn the flag off and confirm the dialog is visually identical to today.
+
+---
+
+## Out of scope
+
+- Trusting or removing a project from inside the dialog. Trust stays in the sidebar; the
+ dialog only disables untrusted entries.
+- Any change to how the active project is persisted.
+- The quick-create path (`Cmd+Shift+N` → `agentManager.createWorktree`,
+ `AgentManagerApp.tsx:1863-1867`). It has no dialog, so it keeps targeting the active
+ project. Worth revisiting only if the explicit-target rule should apply there too.
+- Per-project setup-script or agent selection in the dialog.
+
+## Risks
+
+- **Stale branch data** is the only real correctness risk, and it is why the `projectId`
+ stamp plus the reply guard are mandatory rather than optional polish.
+- **Prop signature change** (`defaultBaseBranch: string` → `defaultBase: (id) => string`)
+ touches both call sites; a partial migration would silently show one project's default
+ branch while creating in another.
+- **Dialog file growth**; mitigated by extracting `ProjectSelect.tsx`.
+
+---
+
+# Appendix: exact UI and styling specification
+
+Everything below is copy-paste ready. Class names, tokens, and icon names are all verified
+against the current tree. Do not invent new tokens or new class names beyond the ones
+listed here.
+
+## A. Visual layout
+
+```
+┌─ New Worktree ─────────────────────────────────────────── X ─┐
+│ │
+│ [ New ][ Import ] [ 📁 kilocode ⌃⌄ ] │
+│ └────────────────────────────────────────────┘ │
+│ ┌──────────────────────────────────────────────────────┐ │
+│ │ Worktree name (optional) │ │
+│ └──────────────────────────────────────────────────────┘ │
+│ ┌──────────────────────────────────────────────────────┐ │
+│ │ prompt … │ │
+│ │ Code ▾ OpenAI / GPT-5.6 ▾ None ▾ ✨ 🔒 🎤 │ │
+│ └──────────────────────────────────────────────────────┘ │
+│ › Advanced options │
+│ VERSIONS [1][2][3][4] [⧉ Compare Models] │
+│ ┌──────────────────────────────────────────────────────┐ │
+│ │ Create Worktree │ │
+│ └──────────────────────────────────────────────────────┘ │
+└──────────────────────────────────────────────────────────────┘
+```
+
+Open dropdown (anchored under the trigger, same width as the trigger):
+
+```
+ ┌────────────────────────────────────────────┐
+ │ 📁 kilocode ~/Documents/git/kilocode ✓│ ← .am-project-option-active
+ │ 📁 cloud ~/Documents/git/cloud │
+ │ 🔒 sample-app ~/dev/sample-app │ ← disabled, 50% opacity
+ │ ⚠ old-repo ~/dev/old-repo │ ← disabled, 50% opacity
+ └────────────────────────────────────────────┘
+```
+
+Rules:
+
+- The selector is inline with the New/Import buttons inside the tab-switcher flex row, so
+ it applies to New and Import alike.
+- The project name and folder icon identify the scope without a separate visible label.
+- The trigger is the same control as the Advanced options base-branch trigger
+ (`.am-selector-trigger`), so the dialog has one visual language for "pick a thing".
+- The row is **not rendered at all** when `props.projects` is empty or undefined. That is
+ the single-project / flag-off case, which must stay pixel-identical to today.
+
+## B. Exact icon names
+
+Only these, from `packages/ui/src/components/icon.tsx`:
+
+| Where | `Icon name` | Notes |
+|---|---|---|
+| Trigger left | `folder` | Always, regardless of project state. |
+| Trigger right | `selector` | Same as every other `.am-selector-trigger`. |
+| Option row, normal | `folder` | |
+| Option row, untrusted | `lock` | Matches the sidebar accordion affordance. |
+| Option row, missing | `warning` | Matches the sidebar accordion affordance. |
+| Option row, selected | `check-small` | Right-aligned. |
+
+All at `size="small"`. Do not use `folder-add-left`, `check`, or `plus`.
+
+## C. New file: `webview-ui/agent-manager/ProjectSelect.tsx`
+
+```tsx
+// Project picker list for the New Worktree dialog
+
+/** @jsxImportSource solid-js */
+
+import { For, Show, type Component } from "solid-js"
+import { Icon } from "@kilocode/kilo-ui/icon"
+import type { AgentProjectSnapshot } from "../src/types/messages"
+
+interface ProjectSelectProps {
+ projects: AgentProjectSnapshot[]
+ selected?: string
+ onSelect: (id: string) => void
+ labels: { untrusted: string; missing: string }
+}
+
+export const ProjectSelect: Component = (props) => (
+