* feat(opencode): remote create_session fields, rename adoption, title sync
Extend create_session wire with optional agent/model/orgId (strict v1,
old-CLI degrade via client retry); claim org via session metadata
(metadata > KILO_ORG_ID > auth); adopt system session.renamed via
setTitle with consume-on-failure adoption marks; POST generation-aware
title changes through readiness (auto-titles marked by ensureTitle,
same-title Updated consumes pending adoptions).
* test(opencode): prove cancel→reprompt reaches idle; lock exit survivor
Item 14 CLI prove-it at SessionPrompt level: cancel-when-idle,
mid-stream, mid-tool, queued follow-up (deterministic queue wait), and
abortIntakes all settle to idle and reprompt completes — no production
hang found, no src change. Item 8: lock survivor session send_message
after sibling exit_cli.
* test(opencode): drop AppRuntime spy from create_session default test
Satisfies check-opencode-promise-facades while still proving the
production default forwards {agent, model, metadata} into
Session.Service.create.
* fix(opencode): bound rename marks, wire title report path, harden title tests
Kilobot review on #12704: adoption/auto-title maps now carry timestamps,
prune on write (60s TTL), and clear on Session.Event.Deleted (exported
clear/clearAll); the Updated watcher calls the interface
reportSessionTitle and fullSync passes preloaded info into meta();
ensureTitle's Kilo logic lives in kilocode/session/prompt.ts behind one
kilocode_change call site; title tests poll instead of sleeping and lock
mark-before-write plus clear-on-failure for real; meta() get-failure
org fallback covered via the _metaForTests seam.
* fix(kilo-sessions): mark bookkeeping before ingest sync, AppRuntime, test cleanup
Kilobot round 2 on #12704: consume rename/auto-title marks before the
ingest.sync network hop so the 60s TTL spans only the in-process hop;
call reportSessionTitle via AppRuntime.runPromise; auth cleanup back
under Effect.ensuring; restore the upstream blank line in prompt.ts so
the fork diff is only the kilocode_change call site.
* fix(kilo-sessions): keep title report self-healing if ingest.sync fails
Advance knownTitles only after successful sync; restore consumed rename/
auto-title marks on failure so the next Updated can re-POST. IIFE keeps
const-style outcome derivation.
* fix(kilo-sessions): optimistic knownTitles with full title-path rollback
Advance knownTitles before the network hop so concurrent Updated handlers
see sameTitle and cannot POST the same title with a wrong generated flag.
Restore prev + consumed marks when ingest.sync throws or reportSessionTitle
returns not-ok, so the next Updated retries the full self-healing path.
* style(kilo-sessions): prettier title Updated handler
* fix(kilo-sessions): preserve newer title state
* refactor(kilo-sessions): simplify title reporting tests
* fix(kilo-sessions): report unseeded title updates
* fix(kilo-sessions): consume unseeded title marks
* test(kilo-sessions): cover unseeded title marks
* test(kilo-sessions): unique ids for unseeded title tests
Thread a distinct session id through unseededMockSessionLayer so
session_share Storage records do not couple the three unseeded cases.
* fix(cli): stabilize Windows CI tests and rebalance slow shards
Three Windows-only instabilities in the CLI unit suite:
1. httpapi-instance-route-auth.test.ts failed with an uncaught
"Invalid handle" error. The test's ConfigProvider.layer(
fromUnknown(...)) replaced the ambient config provider, blinding
KILO_EXPERIMENTAL_DISABLE_FILEWATCHER=true that CI/preload sets. With
the flag hidden, the @parcel/watcher Windows backend subscribed on the
temp repo's .git; the tmpdir fixture then deleted that directory while
the never-disposed per-test runtime still held the subscription, and
CreateFileW failed with the hardcoded "Invalid handle" (napi rejection
with no JS stack). Add the disable-filewatcher flag to every test
config map that boots instances via the HttpApi app (instance-route-auth,
cors, ui, exercise backend, kilo-edit, memory).
2. config-overlay.test.ts intermittently returned HTTP 500 on Windows.
Filesystem.write's atomic temp-file+rename had no retry for Windows
transient locked-file errors (EPERM/EACCES/EBUSY) from Defender/indexer
and the detached background plugin install racing the rename in the same
tmpdir. Mirror the proven cleanup.ts locked-error retry pattern with a
short backoff, Windows-only.
3. Windows shards were badly imbalanced: the sharder weighted files by
byte size, which concentrated every slow spawn/FS/lock-heavy file
(snapshot, prompt, provider, run-process, instance-bootstrap,
httpapi-session) into one shard (~612s vs ~356s siblings), and the
resulting contention forced whole-file retries that doubled cost. Add
TestShard.timedWeight and a committed test-timings.json seeded from CI
junit data so shards balance by measured runtime (spread collapses from
~200s to ~18s) and contention-prone files spread across shards.
Platforms without manifest entries fall back to size weighting.
* fix(cli): skip stale manifest entries in timed shard weighting
Bun.file().size returns 0 (never throws) for missing paths, so the
try/catch in timedWeight was dead code and stale/renamed manifest entries
added their time to the scale numerator with zero size, inflating the
size-to-time ratio that estimates unknown files. Skip entries with a
non-positive on-disk size instead of catching a throw that never happens.
* revert(cli): drop hardcoded test-timings manifest
The committed test-timings.json (482 entries) was a maintenance burden:
it goes stale as tests are added/renamed and no size-based heuristic can
replace it (slow subprocess outliers like run-process.test.ts are 7kb but
112s, 10x the runtime-per-byte of other files). Revert the timing-weighted
sharding to the prior size-based LPT. The Windows reliability fixes
(ConfigProvider filewatcher flag + Filesystem.write locked-file retry)
remain and are what eliminate the failures and the ~360s of retry overhead
that dominated the 12m50s shard. A maintainable runtime-based rebalance
(self-updating CI cache fed from the junit artifacts CI already uploads)
is a separate follow-up.
The auth mode probes every protected route with valid credentials to
prove the route accepts them. Two routes intentionally block after a
valid request: tui.control.next waits for queued TUI input, and
instance.reload can outlive the one second probe. The probe won by
timeout, marked the scenario passed, and left the request alive inside
the cached web handler. Final disposeApps() then waited for those
requests forever, so any run that rebuilt the app (cold turbo cache)
never exited and CI cancelled the job at 15 minutes.
Add a scenario flag that keeps the missing-credentials check (the route
must still return 401) but skips the valid-credential probe for routes
whose valid requests intentionally block, and mark tui.control.next and
instance.reload with it.
Introduce a primaryWorktree Effect that queries Git plumbing commands
to locate the main checkout from any linked worktree. Integrate it
into config loading so .kilo directory settings from the primary
checkout act as local-scoped fallbacks beneath the active worktree
and KILO_CONFIG_DIR overrides.
Wire primaryPaths into skill discovery so project skills installed in
the primary checkout appear as fallbacks unless overridden locally.
Refactor session family matching to consider sandbox directories and
filter out nested Git repositories when resolving worktree roots.
Convert baselineDirectory in indexing to an Effect that delegates to
primaryWorktree instead of reading Instance.project.worktree directly.
Restore the content() signal usage in the TUI text part renderer.
Provide Git.defaultLayer across all affected test layers and add
coverage for linked worktrees, submodules, paths with spaces, sandbox
project matching, and primary config directory precedence.
Add ptyConnectApiRoutes to createListenerRoutes so PTY WebSocket
connections work through the Kilo listener layer. Bump
gitlab-ai-provider to 6.8.0 and drop it from the supply-chain
quarantine exclusion list.
Realign kilocode_change comment markers to their correct lines across
tui-schema, session.sql, and several test/story files. Update ACP
auth tests to expect Kilo-branded agent name and method IDs, fix
httpapi-ui test to assert 404 for the disabled fallback UI proxy,
and point the OAuth branding test at the relocated codex plugin path.
Add new test coverage for the ACP Agent interface contract and
primaryWorktree resolution across normal repos, linked worktrees,
submodules, and paths with spaces. Refresh TUI inline-tool-wrap
snapshots and session recording fixtures to reflect current branding.
Provider plugins (llmgateway, nvidia, openrouter, vercel, zenmux) now
verify the provider ID before applying attribution headers, preventing
custom-defined providers sharing the same endpoint URL from being
mutated by built-in plugin logic.
Additional changes:
- Add auth-v2.json migration path for multi-account store continuity
- Remove obsolete @ai-sdk/xai patch and ConsoleCommand registration
- Add native LLM session recordings for anthropic, openai-oauth, and zen
- Update CLI help snapshots to reflect Kilo branding
- Expand i18n with usage-exceeded dialog strings (it, nl, uk)