Addresses review feedback: `gh api | head -n1` can fail under bash
pipefail because head closes the pipe early and SIGPIPEs gh api. The
tag_name + asset-name filter already returns a single URL, so drop
--paginate and the head pipe.
Fixes Kilo CLI install failing with curl exit 22 when the smoke-test
workflow runs as a pre-publish gate. The browser download URL
(github.com/.../releases/download/...) 404s on draft releases, so
look up the asset via the releases API and let the installer use the
API URL with Accept: application/octet-stream and bearer auth.
Also bumps smoke-test.yml permissions to contents: write so the job
token can see draft releases, and re-enables the smoke-test job in
publish.yml.
Replace raw async/Promise-based test helpers with Effect-based
equivalents to align with the upstream BashTool API changes. Introduce
a ManagedRuntime composed of CrossSpawnSpawner, AppFileSystem, Plugin,
Truncate, and Agent layers. Update metadata, ask, and execute call
sites to return Effect values instead of plain promises.
Add experimental workspace adaptor list and status endpoints to the
OpenAPI spec. Add --sanitize flag to CLI export command for redacting
sensitive data. Update SDK types to reorder session status types before
suggestion types. Remove deprecated /global/sync-event endpoint.
Includes formatting fixes across i18n files, opencode source, and
tests, plus a warpgrep import path correction.
* docs(cli): note cloud schema mirror when adding kilocode_change config keys
Points devs to apps/web/src/app/config.json/extras.ts in the cloud repo
so new Kilo-only config keys get recognised by $schema references.
Closes#9115
* docs: add CLI config schema page and AGENTS.md mirror rule
Short page under Contributing → Architecture explaining how the cloud
overlays Kilo extras on top of the upstream opencode JSON Schema, with
the step-by-step for adding a new Kilo-only config key. AGENTS.md gains
a one-liner in the Fork Merge Process section pointing to it.
* perf(vscode): paginated message loading with virtualized scroll
Reimplement session message loading with cursor-based pagination and
virtual list rendering to reduce initial load time and memory for long
sessions.
* chore: update kilo-vscode visual regression baselines
* fix(vscode): update VscodeSessionTurn props in storybook
* chore: update kilo-vscode visual regression baselines
* perf(vscode): skip reconcile on session switch, lazy part hydration, fast markdown render
Skip SolidJS reconcile() for replace-mode message loads — direct array
assignment avoids expensive O(n) diffing and proxy creation for 80+
messages on every session switch.
Defer part hydration until the virtualizer renders each turn, reducing
reactive store writes by 85% on initial load. Double-rAF scroll
restoration avoids forced layout reflow mid-paint.
Extract markdown fast-path render into packages/ui/src/kilocode/ to
minimize shared file changes.
* fix(vscode): keep lazy part hydration correct in stories
* fix(vscode): resolve state-risk regressions in message pagination
Five correctness issues surfaced during review of the paginated-message-
loading stack, plus the follow-through performance tuning needed to keep
session switching near-instant:
- focus-mode selection re-enters the server for the tail (new "reconcile"
load mode) so SSE drops self-heal on the next session switch instead of
stranding the webview on a stale snapshot. Throttled to 1s to avoid
stacking up fetches on rapid tab switching, and early-outs in the
webview when the server tail matches local state.
- cursor pagination falls back to a client-synthesized `{id,time}` cursor
when a proxy or older binary strips the X-Next-Cursor header, so "load
earlier" keeps working.
- in-flight loadMessages results for a session deleted mid-fetch are
dropped instead of resurrecting a ghost entry in the webview store.
- sub-agent viewer now loads the full transcript via `limit: 0` instead
of silently truncating to MESSAGE_PAGE_LIMIT (it has no "load earlier"
UI to recover from the cap).
- stashed message parts are now cleared on messageRemoved. Extracted the
stash-access helpers into a PartStash class so every lifecycle event
coordinates store + stash cleanup in one place.
Also restores the two-pass markdown rendering intended by PR #7102 — an
upstream merge silently re-added marked-shiki, which made Shiki run
synchronously during parse and froze the main thread for up to 1.3s on
session switches with many code blocks. Code blocks render as plain
<pre><code> first and deferredHighlight() upgrades them after paint.
Regression tests cover all five state risks (fetchMessagePage cursor
fallback, KiloProvider focus reconcile, ghost session on prepend,
sub-agent full load, focus-mode throttle, PartStash leak on
messageRemoved).
* chore(vscode): restore unrelated doc comments in KiloProvider
PR review: the previous fix commit trimmed four unrelated doc comments
(loadMessagesAbort, handleSyncSession JSDoc, "inherit parent directory"
comment, handleDeleteSession JSDoc) to squeeze under the 3350-line
max-lines cap. Restoring them — the cap is hit exactly at 3350 and the
PR surface stays focused on the state-risk fixes.
* chore: update kilo-vscode visual regression baselines
* refactor: simplify pagination helpers without behavior change
- fetchMessagePage: drop the conditional spread for `limit`/`before` — the
server schema accepts `limit: 0` the same as omitted (`z.coerce.number()
.int().min(0).optional()`), so always passing the values directly works.
Inline the `oldest` temp and drop `?? undefined` (`headers.get()` returns
`null | string` which `??` handles identically downstream).
- handleLoadMessages: inline the single-use `focus` boolean, fold the
`mode === "replace"` refresh call into the `if (abort)` block since
they're gated by the same condition.
- sameReconcileShape: destructure `c`/`n` once per iteration instead of
accessing `current[i]!` / `incoming[i]!` three times each.
All 1815 tests pass, typecheck + lint clean.
* docs: clarify intent of helpers flagged in PR review
- commands.ts: comment explains the in-flight dedup pattern and why the
identity check in the `finally` guards against clear-then-restart races.
- sessionsForWorktree: comment notes the oldest-first sort is the canonical
order before applyTabOrder, and why both the worktree label and the tab
bar must agree on "which session is first".
No behavior change — both helpers already did this; now the intent is on
the page for future readers.
* chore: address PR #8911 review feedback from chrarnoldus
- Rewrite changeset as user-facing imperative summary (per AGENTS.md
guidance: changesets appear in release notes; keep concise and feature-
oriented, not implementation details).
- Drop redundant `kilocode_change - new file` marker on
packages/ui/src/kilocode/markdown-fast-path.ts — the kilocode/ directory
already signals the file is a Kilo addition; markers aren't needed in
paths containing "kilocode".
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Addresses PR #9046 review feedback. diffFile() used to read the entire ancestor blob, working copy, and unified patch into memory unconditionally, which could spike the extension host's RSS when opening a very large tracked file. Probes the sizes first via `git cat-file -s` and `fs.stat`, and falls back to a summarized entry (empty before/after/patch, counts preserved) when either side exceeds 2 MB.
Runs the diff summary and detail computations in-process using the existing GitOps child_process.spawn path instead of routing through kilo serve over HTTP. This avoids the Bun spawn native-memory leak on Windows (oven-sh/bun#18265) that was driving kilo serve RSS into the multi-GB range within minutes of opening the Agent Manager.
@changesets/changelog-github renders GitHub App credits with the app slug (e.g. [@kilo-code-bot](https://github.com/apps/kilo-code-bot)), not the '[bot]'-suffixed commit author login. v7.2.12 leaked a 'Thanks @kilo-code-bot!' line because the team set only contained 'kilo-code-bot[bot]'. Add the bare slug.
* fix(vscode): restore sidebar diff viewer parity with Agent Manager
The sidebar diff viewer bundle was missing agent-manager-review.css, so
FullScreenDiffView rendered with a broken file tree (no flex layout, no
revert styles) since PR #7455. Co-locate the CSS imports with the
component so every consumer gets them automatically, and wire per-file
revert end-to-end via a shared WorktreeDiffClient used by both the
sidebar provider and the Agent Manager controller.
* fix(cli): skip flaky shell-completion test on Windows CI
The 'shell completion resumes queued loop callers' test relies on shell
process spawn timing that is unreliable on Windows CI and times out at
3s. Every other shell-process test in this file already uses the
existing `unix(...)` helper for the same reason — align this test
with that pattern.
Workaround for upstream Bun memory leak oven-sh/bun#18265: Bun.spawn
with piped stdio accumulates ~2 MB of native RSS per call on Windows
because mimalloc retains freed pages in its arenas instead of returning
them to the OS. The Agent Manager polls git once per second per
worktree via the CLI, so a few minutes of use reaches multi-GB RSS.
Jarred (Bun) confirmed the workaround in oven-sh/bun#21560: setting
MIMALLOC_PURGE_DELAY=0 forces immediate page return, greatly reducing
the RSS growth.
Applied only to the kilo serve process spawned by the VS Code
extension - no other code changes.
None of the speculative fixes on this branch addressed the root
cause: Agent Manager RSS growth is upstream Bun memory leak
oven-sh/bun#18265 - Bun.spawn with piped stdio retains native
memory in mimalloc arenas on every call. Measured this branch at
~2.1 MB/spawn, flat, identical on Bun.spawn and node:child_process
(the latter is a Bun polyfill over the same machinery). No code
path in our tree is the problem.
Restoring branch tree to the merge-base state so the Bun-blessed
MIMALLOC_PURGE_DELAY=0 workaround can be applied cleanly in a
follow-up commit.
Commits whose effects are undone (kept in history for posterity):
96ce0cb fix(cli,vscode): fix native memory leak in Agent Manager git polling
7682f1a fix(review): surface truncated git output to callers
18d6867 fix(review): drain stderr concurrently to avoid hang
0965571 fix(cli,vscode): evict idle worktree instances and stream git output
* feat(kilo-ui): enhance MCP tool display with input/output sections and improved styling
- Add subtitle and args display to MCP tool triggers for better context
- Separate input and output sections with labels and dividers
- Format input and output as JSON with proper syntax highlighting
- Reposition copy button tooltip to prevent clipping in tool output
- Add styling for MCP section labels and tool dividers
* feat(kilo-ui): i18n for MCP input/output labels
* chore: add changeset
---------
Co-authored-by: Sylwester Liljegren <sylwester.liljegren@softronic.se>