Commit Graph
2867 Commits
Author SHA1 Message Date
Christiaan Arnoldus dab2e79d6e fix(cli): exclude gpt-5.6 from ChatGPT subscriptions 2026-07-28 14:44:40 +02:00
Whitebeard 1310c1200a fix: make snapshot diffs resilient on Windows (#12583) 2026-07-28 14:23:47 +02:00
Marius fb5f5ae31b Merge pull request #12593 from Kilo-Org/profile-active-kilo-sessions-cpu-usage
fix(vscode): avoid eager worktree watchers
2026-07-28 13:05:29 +02:00
marius-kilocode 160b06661a fix(vscode): avoid eager worktree watchers 2026-07-28 12:48:30 +02:00
Marius 256703a37f Merge branch 'main' into abalone-bactrosaurus 2026-07-28 11:28:15 +02:00
Marius fc04f4f6ff Merge branch 'main' into reproduce-and-fix-revert-file-rollback-bug 2026-07-28 11:27:54 +02:00
marius-kilocode 2c61d29fb7 fix(cli): compensate checkpoint restore failures 2026-07-28 11:09:55 +02:00
Marius c21b01f25a Merge pull request #12460 from Kilo-Org/marius-kilocode/kilo-opencode-v1.17.9
chore(opencode): merge v1.17.6 through v1.17.9
2026-07-28 11:03:04 +02:00
Marius f336cfee0a Merge pull request #12588 from Kilo-Org/fix/provider-first-byte-timeout
fix(cli): prevent agent-loop freeze when a provider stalls after headers
2026-07-28 11:00:52 +02:00
marius-kilocode 8dba38a2fa fix(cli): update shell regression import 2026-07-28 10:45:20 +02:00
marius-kilocode 60217b482d Merge remote-tracking branch 'origin/main' into marius-kilocode/kilo-opencode-v1.17.9 2026-07-28 10:43:36 +02:00
marius-kilocode 7058e07649 fix(cli): dispose HttpApi instances before apps 2026-07-28 10:39:00 +02:00
marius-kilocode deddf0012f fix(cli): bound provider first response byte by the request timeout
A provider can accept a request, return response headers, and then never
send a byte of body data. The connection-phase request timeout was cleared
as soon as headers arrived, so nothing bounded that wait and the agent turn
hung indefinitely after a tool call completed: step-finish:tool-calls was
recorded and the next step-start never arrived, with the HTTP server still
responsive.

Extend the same configured timeout deadline to the wait for the response
body's first byte. The connection-phase timer covers the fetch up to
headers; once headers arrive, the remaining deadline is handed to a
first-byte guard that aborts the request if no data arrives. After the
first byte the guard becomes a passthrough, so idle gaps inside an already
streaming response (reasoning, buffering, slow token generation) are never
touched and remain opt-in via chunkTimeout.

This is a transport-level signal (bytes on the wire, before any content)
rather than the absence of normalized AI SDK events, so it cannot fire on
long prompt processing or reasoning the way the reverted stream watchdog
did. timeout: false still disables the bound entirely.

Adds a hermetic regression test that injects a simulated stalled socket
through the provider's own fetch option via the plugin config hook, so the
SDK, Kilo's fetch wrapper, SSE parsing, the processor and the agent loop
all stay production code. The stalled request is transient, so the test
asserts the turn recovers by retrying and completing instead of freezing.
The test goes red without the fix (no retry, frozen at step-finish) and
green with it.

Refs #8656
2026-07-28 10:35:56 +02:00
marius-kilocode 16f8e7ef7f fix(cli): keep session reverts atomic 2026-07-28 10:34:40 +02:00
marius-kilocode 80321b861f fix(vscode): repair CI failures and address multi-project review findings
CI:
- Render the config console's active overlay target from its new object
  shape instead of passing it to JSX.
- Make the config overlay `expected` revision optional in the schema,
  writer, and handler so clients without a binding write unconditionally
  instead of receiving a 400, and add the missing PUT /indexing/consent
  exerciser scenario. Regenerate the SDK for the schema change.
- The multi-project Storybook story called useLanguage() outside its
  provider and rendered nothing; it now uses the story translator.
- Scope indexing test select locators by row title, since the tab gained a
  project selector that shifted positional lookups.

Review findings:
- Gate worktree creation, promotion, and multi-version creation on the
  target project's state: waitForStateReady only tracked the active
  project, so those handlers could mutate a background project's state
  before it loaded.
- Re-check trust and enablement for every project-stamped message instead
  of resolving contexts through the unchecked map lookup.
- Register projects through resolveProjectRoot so a folder inside a linked
  worktree cannot duplicate an existing project, and fix that helper to
  issue valid rev-parse commands.
- Validate the persisted activeTarget shape before applying it.
- Stop throwing from workspace/session directory resolution: it runs
  eagerly per webview message, where a throw dropped the message.
- Evict superseded config bindings per scope and directory.
- Guard the multi-project rename against the blur that Escape triggers.
- Unregister routes when disabling secondary projects.
- Replace the section message substring test with an explicit type set.
- Match an open session tab in the project search's current item and scope
  selection acks by project id.
- Filter untrusted projects out of indexing consent, and restore config
  scope switching plus project-scoped indexing writes that the consent
  rework had removed.
- Round-trip the sessions-collapsed mutation so multi-project bodies, which
  render purely from pushed state, reflect the toggle.
2026-07-28 10:32:05 +02:00
Marius a0a760e00e fix(cli): enforce permissions on shell commands the parser fails to scan (#12585)
* fix(cli): enforce permissions on shell commands the parser fails to scan

* fix(cli): fail closed on error chunks without command names, move pwsh execution test to kilo file
2026-07-28 09:50:32 +02:00
Josh Lambert 4a34d7b5d0 Merge remote-tracking branch 'origin/main' into feat/websearch-config-setting
# Conflicts:
#	packages/opencode/test/tool/registry.test.ts
2026-07-27 17:44:51 -04:00
Josh Lambert c5d3032118 fix: keep third-party web search opt-in 2026-07-27 14:47:11 -04:00
cmanu 2305b2242a fix(charts): Remove from cli tests 2026-07-27 11:20:33 -07:00
cmanu 2a0d94f86c fix(charts): Address kilo code bot cmts: Move soul.txt to system prompt; Add unit tests for vs code only feature. 2026-07-27 10:52:06 -07:00
Josh Lambert 34e787e5ac fix: enable web search by default 2026-07-27 11:48:09 -04:00
cmanu 2fefaa888c fix(charts): Cassettes re-recorded 2026-07-27 08:22:07 -07:00
marius-kilocode 8932a2033b test(cli): disable indexing in HttpApi exerciser 2026-07-27 17:08:27 +02:00
cosi-conda 1ba4116165 Merge branch 'main' into feature/charts 2026-07-27 07:46:14 -07:00
marius-kilocode 46b7e55f8d feat(vscode): multi-project Agent Manager with per-project state, sessions, and lifecycle
Add an experimental multi-project mode to the Agent Manager sidebar behind
kilo-code.new.experimental.multiProject (default off). A persistent project
registry catalogs additional git repositories across restarts, while the
workspace repository stays the pinned default project.

Extension:
- Immutable per-project contexts own all repository-bound services (state,
  worktrees, setup scripts, stale tracking, pollers) with generation-based
  invalidation and fail-closed trust checks.
- ProjectContexts manage activation, expansion, and fast switching; session
  routes resolve directories exactly per project via a shared route service.
- pushProjectSessions caches each project's session list and re-posts it on
  fresh skips; session.created/updated/deleted SSE events upsert into the
  owning project's cache so externally created sessions appear immediately.
- Selection restore persists the active target per project and falls back to
  the local context silently when the remembered target is gone.
- Worktree lifecycle handlers extracted into provider-lifecycle.ts with an
  explicit deps object instead of ambient project scope.
- initializeState and onRequestState always refresh sessions: with zero
  managed sessions the listing never ran and the sidebar skeletons forever.
- Log instead of dropping silently when a state-gated message is not ready.

Webview:
- ProjectList accordion with per-project sidebar body, search, actions, and
  default-branch dialog; selecting a project header restores its target.
- Local session tabs and terminal contexts are bucketed per project so open
  tabs never leak across projects sharing the LOCAL context.
- The active project's session list overlays the live session store so new
  sessions show without waiting for a backend re-list.
- SectionHeader requires a DragDropProvider ancestor; the multi-project body
  now provides one (its absence crashed the whole webview render).
- SidebarBody and TabBar extracted out of AgentManagerApp (3215 to 2748
  lines); AgentManagerProvider down to 1887 with caps lowered accordingly.

Also includes the config write revision bindings and per-project indexing
consent groundwork that rode along on this branch.
2026-07-27 16:44:57 +02:00
Josh HolmerandJohnny Eric Amancio c12a567f2a test(cli): cover TUI startup outside package (#12417)
* test(cli): cover TUI startup outside package

* fix(cli): use native preload path in TUI test

---------

Co-authored-by: Johnny Eric Amancio <johnnyeric@gmail.com>
2026-07-27 15:14:31 +02:00
marius-kilocode 46d48db825 fix(cli): close HttpApi exerciser resources 2026-07-27 14:16:11 +02:00
Igor Šćekić b2735bfbc9 fix(cli): flush the session ingest tail on shutdown (#12545)
* fix(cli): drain session ingest queue on shutdown and flush terminal batches promptly

* fix(cli): drain the session ingest queue on process shutdown

* fix(cli): pin drain bound expiry, add changeset, conform to naming rule

* fix(cli): keep kilo-sessions out of the CLI startup import graph

* fix(cli): never let the ingest drain task reject the shutdown sequence

* test(cli): pin drain-before-dispose ordering on the KiloCli shutdown path

* fix(cli): make the guarded ingest drain non-rejecting and correct the lazy-import rationale

* test(cli): cover the retryable-status drain path under shutdown

* test(cli): decouple cli-shutdown drain assertions from declaration order
2026-07-27 11:12:42 +02:00
Christiaan Arnoldus 614c21ee81 Merge pull request #12544 from Kilo-Org/fix/opus-5-adaptive-thinking
fix(cli): support adaptive thinking for Claude 5+
2026-07-27 10:16:23 +02:00
Marius 17cc581129 Merge pull request #12514 from Kilo-Org/fix-cli-subprocess-timeouts
fix(cli): stabilize cross-platform subprocess tests
2026-07-27 09:16:28 +02:00
marius-kilocode 28f2abe5e9 Merge remote-tracking branch 'origin/main' into marius-kilocode/kilo-opencode-v1.17.9 2026-07-27 08:11:14 +02:00
marius-kilocode c8abc86fe7 fix: align merged CI contracts 2026-07-27 08:10:52 +02:00
chrarnoldusandkiloconnect[bot] 8aeff4856f fix(cli): cover future sonnet adaptive versions
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
2026-07-26 20:50:52 +00:00
chrarnoldusandkiloconnect[bot] a69a7cc5c4 fix(cli): cover future opus adaptive versions
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
2026-07-26 20:03:01 +00:00
chrarnoldusandkiloconnect[bot] b8d83fb537 fix(cli): support adaptive thinking for opus 5
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
2026-07-26 19:36:51 +00:00
Igor Šćekić a19d44c3ef Advertise the instance from enableRemote and report attention status on the heartbeat (#12532)
* fix(cli): advertise the instance from enableRemote so /remote registers as a spawn target

Enabling the remote relay from the TUI `/remote` slash command connected the
socket and mirrored sessions, but never advertised the instance, so the CLI
never appeared as a spawn target in the mobile "Run on" picker. Only the
explicit `kilo remote` command called setInstanceAdvertisement.

The advertisement now runs on every successful enableRemote() entry, before the
already-connected and coalescing early returns. That ordering matters: bootstrap
auto-enable frequently connects first, so `/remote` usually hits
`if (remote) return` and an advertisement placed in the connection-setup body
would leave the defect unfixed in the common case. `ingestDisabled` returns
before the advertisement and stays unadvertised.

The ensure helper is a no-op when an advertisement is already set, so it fires no
extra heartbeat, while explicit setInstanceAdvertisement keeps its existing
replace semantics. buildInstanceAdvertisement moves to a shared module so the
command path and the enable path derive it identically.

* fix(cli): report pending question and permission on the session heartbeat

The heartbeat built each session's status from SessionStatus.Service, whose
union is idle/retry/busy/offline and which never consults Question.Service or
Permission.Service. deriveStatus() already did consult both, but only fed the
ingest session_status sync. So a session genuinely blocked on a question was
advertised as busy on the heartbeat, and the mobile app — which takes live row
status from the heartbeat — showed no needs-input badge.

Extract the precedence (permission, then question, then SessionStatus) into a
shared helper used by both deriveStatus and the heartbeat, so the two channels
cannot drift.

The heartbeat runs on a ~10s timer across every session, and deriveStatus makes
service calls per session, so the permission and question lists are fetched once
per tick and indexed by session id rather than queried per session. A test pins
the call count.

Behaviour note beyond the strict fix: sharing the derivation also means a
SessionStatus of offline now reports as retry on the wire, matching what
deriveStatus has always sent to ingest. Nothing consumes offline from the
heartbeat — the transport forwards only idle and busy, and the mobile row treats
both as non-attention — so the effect is that the two channels now agree. The
detach fence test is parameterised accordingly; its assertion that the status
clears on detach is unchanged.

* chore(cli): widen the promise-facade allowlist for the heartbeat attention tests

The DEF-3 heartbeat tests raise and reply to real Question and Permission
requests through the global AppRuntime, which took kilo-sessions.test.ts from 4
classified references to 29 and failed the allowlist check.

Bumping the count rather than restructuring the tests is deliberate: the
heartbeat resolves attention status from the global Question.Service and
Permission.Service, so asserting it requires driving those same services.
Scoped layers cannot express that — the global-runtime coupling is the thing
under test — and it is the same integration pattern this entry already
sanctioned for the detach fence. The reason string records that.
2026-07-25 15:45:43 +02:00
Joshua Lambert eab61d853a Merge pull request #12505 from Kilo-Org/fix/run-duplicate-events
fix(cli): emit run events once
2026-07-24 19:48:51 -04:00
cmanu f2760daf8e Merge branch 'main' into feature/charts 2026-07-24 12:43:38 -07:00
Marius 85a5ebf3e7 Merge branch 'main' into fix-cli-subprocess-timeouts 2026-07-24 18:55:11 +02:00
LCZcn96 c72817e67f fix(cli): bound skill discovery in non-git projects (#12475) 2026-07-24 16:31:31 +02:00
marius-kilocode f3a4003356 fix(cli): resolve bundled OpenTUI native modules 2026-07-24 15:09:23 +02:00
Bruno Agatao 9c16457083 Merge remote-tracking branch 'origin/main' into feat/explain-tool-auto-approval 2026-07-24 14:27:39 +02:00
marius-kilocode a33493e722 fix(cli): stabilize cross-platform subprocess tests 2026-07-24 14:23:03 +02:00
marius-kilocode 64343089d8 chore: merge latest main 2026-07-24 13:12:52 +02:00
marius-kilocode 1b60773cae fix: resolve OpenCode merge regressions 2026-07-24 12:56:42 +02:00
marius-kilocode 40fd27d22a fix(cli): validate persisted Vercel request IDs 2026-07-24 12:42:15 +02:00
Bruno Agatao 0eb9face86 Merge remote-tracking branch 'origin/main' into feat/explain-tool-auto-approval 2026-07-24 12:35:42 +02:00
Bruno Agatao b36b24e827 fix(cli): track auto-approval provenance per permission pattern, not per key 2026-07-24 12:32:33 +02:00
marius-kilocode 9ecdfdc19e fix(vscode): persist both response identifiers 2026-07-24 12:27:54 +02:00
marius-kilocode d29f1bdd43 fix(vscode): show both response identifiers 2026-07-24 12:21:21 +02:00