Skip to content

OpenCode v1.14.51 - #11031

Merged
marius-kilocode merged 400 commits into
mainfrom
marius-kilocode/kilo-opencode-v1.14.51
Jun 10, 2026
Merged

OpenCode v1.14.51#11031
marius-kilocode merged 400 commits into
mainfrom
marius-kilocode/kilo-opencode-v1.14.51

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

1.14.49

Core

Improvements

  • Add the v2 model and provider listing API
  • Add DigitalOcean OAuth and Inference Router support
  • Create a global opencode.jsonc automatically when no config exists
  • Enable customize-opencode by default with a linked full schema
  • Autocomplete configured references in prompts
  • Parse fenced Markdown code blocks in patch diffs by default

Bugfixes

  • Fix keymap fallback priority and improve TUI config diagnostics
  • Restore model suggestions for unloaded providers and missing models
  • Preserve layered permission rule order in config merges
  • Preserve attachments returned by custom tools
  • Keep recent turns after compaction instead of folding them into the summary
  • Fix prompt cursor movement and mentions for wide characters
  • Prevent duplicate submits from creating empty phantom sessions
  • Keep compacted tail history when forking a session
  • Return proper busy-session errors from the HTTP API

TUI

Improvements

  • Add pinned recent sessions, quick slots, and recent-session cycling

Bugfixes

  • Restore non-interactive run exit behavior
  • Make the websearch provider label update reactively
  • Reduce flicker when switching workspaces
  • Fix run --json output draining
  • Fix prompt history and line up/down commands

Desktop

Improvements

  • Add Ctrl/Cmd+number shortcuts to switch projects
  • Remember whether the todo dock is collapsed
  • Restore AppStream metadata in Linux desktop builds

Bugfixes

  • Show clearer wrapped server errors in the app
  • Use the login shell when loading desktop environment variables
  • Remember the selected model variant when switching sessions or projects
  • Open the next available project when closing the current one
  • Prevent streamed Markdown from being cut off

1.14.50

Core

Bugfixes

  • Keep HTTP event streams open so subscribers continue receiving instance updates
  • Return proper busy errors when a session is already running prompt or shell work
  • Allow invalid small_model values to fall back cleanly
  • Improve missing-model errors with suggestions

TUI

Improvements

  • Restore markdown rendering for session output by default

SDK

Improvements

  • Add instance.directory and instance.workspace query support to v2 model and provider calls

1.14.51

Core

Improvements

  • Add experimental background subagents
  • Add the required billing origin header for NVIDIA endpoints

Bugfixes

  • Accept worktree creation requests that omit the POST body
  • Finalize interrupted assistant messages after cancellation
  • Prevent repeated auto-compaction after compaction reorders messages
  • Update LiteLLM compatibility for current GPT-5 and tool-call behavior
  • Close truncated shell output streams cleanly
  • Stop exposing internal named defect details from the HTTP API
  • Fix Azure GPT-5.5 requests through the completions API
  • Restore automatic image resizing for oversized attachments

TUI

Bugfixes

  • Preserve text selection when clicking question prompt options

Desktop

Improvements

  • Add MCP client registration and authentication status with direct re-auth flows

Bugfixes

  • Fix Windows app detection by reading command output correctly

Extensions

Bugfixes

  • Scope DigitalOcean OAuth to the required GenAI permissions

kitlangton and others added 30 commits May 12, 2026 20:45
Co-authored-by: Andrew Suffield <asuffield@cloudflare.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
@marius-kilocode
marius-kilocode marked this pull request as ready for review June 9, 2026 11:26
if (
(isLiteLLMProxy || input.model.providerID.includes("github-copilot")) &&
input.model.providerID.includes("github-copilot") &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: LiteLLM stub tool removed — potential breaking change for LiteLLM users

The previous code injected a stub tool for providers containing litellm in their ID (or with litellmProxy: true option) when message history has tool calls but no active tools (e.g. during compaction). This fix removes that behavior entirely, leaving only GitHub Copilot.

Users running Kilo against LiteLLM proxies will now get API validation errors during compaction because the backend requires a tools parameter when message history contains tool calls but the tools array is empty. This is an upstream change — worth flagging to verify if any Kilo-specific LiteLLM users exist who need a migration path or workaround.

@@ -219,7 +226,6 @@ export const layer = Layer.effect(
glob: "allow",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: codesearch permission removed from Scout agent

The codesearch: "allow" permission was removed from the Scout agent's permission list. If Scout is expected to use code search to explore referenced repositories, removing it may silently break that functionality. Verify this is intentional — possibly Scout no longer needs codesearch, or a different mechanism is now used.

Effect.fn("BackgroundJob.state")(function* () {
return {
jobs: yield* SynchronizedRef.make(new Map()),
scope: yield* Scope.Scope,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Scope.Scope is acquired from InstanceState.make context but the State type stores it as a plain Scope.Scope reference

The scope in State is obtained via yield* Scope.Scope inside InstanceState.make's init callback. This scope is the ScopedCache entry scope — forking jobs into it means they are tied to the cache entry's lifetime (i.e. invalidated when the instance is removed). That looks intentional for cleanup, but note that jobs are forked with Effect.forkIn(s.scope) which means the scope must still be open when the job starts. If InstanceState.invalidate closes the scope before all forked fibers are interrupted, there could be a brief window where new start() calls race against scope teardown.

@kilo-code-bot

kilo-code-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Previously Flagged Issues — All Resolved
File Previous Issue Status
packages/opencode/src/session/llm.ts LiteLLM stub tool removed — potential breaking change for LiteLLM proxy users RESOLVED — stub reinstated with broader auto-detection and litellmProxy: true opt-in
packages/opencode/src/agent/agent.ts codesearch permission removed from Scout agent RESOLVEDcodesearch: "allow" restored; dedicated test added in scout-codesearch.test.ts
packages/opencode/src/background/job.ts Scope lifetime race in BackgroundJob RESOLVEDbackground/job.ts removed entirely; BackgroundJob service no longer exists
Incremental Changes Reviewed (commit b2798ef)

Session patch preservation fix

The single new commit (fix(vscode): preserve partial session updates) refactors session-update handling in the VS Code extension:

kilo-provider-utils.ts — Extracts applySessionPatch and sessionPatchToWebview as testable pure functions. The set/update/share helpers correctly distinguish "not present" (undefined → skip) from "explicitly cleared" (null → delete), so required fields like slug, projectID, directory, title, version, and time.created/updated are protected from accidental null-clearing while optional fields like workspaceID, path, summary, cost, tokens, share, agent, model, permission, revert, time.compacting, and time.archived can be explicitly unset.

KiloProvider.ts — For session.updated events, this.currentSession receives the full patched state via applySessionPatch (line 3115) before mapSyncEventToWebviewMessage reads it (line 3157). For the current session the webview gets a complete sessionToWebview snapshot; for non-current sessions it gets a minimal WebviewSessionPatch. Both paths are correct.

session.tsx webviewhandleSessionUpdated now guards clearClose/resetTodos behind changed = session.revert !== undefined, so those side effects only fire when revert was actually part of the patch. Prevents spurious todo resets on title/cost-only updates.

SessionUpdate typePartial<SessionInfo> & Pick<SessionInfo, 'id'> is minimal and precise; SolidJS setStore merges partial updates correctly.

effect-zod.test.ts — New comprehensive test suite for the effect-zod bridge covering class schemas, structs, tuples, unions, enums, ZodOverride, Schema.check translations, StructWithRest catchall, transforms, memoization, well-known refinements (isInt, isGreaterThan, isLessThan, isPattern, etc.), and optionalWith defaults. Tests exercise the real implementation.

.changeset/session-patches-stay-whole.md — Appropriate patch changeset with a clear user-facing description.

Files Reviewed (incremental — 8 files)
  • .changeset/session-patches-stay-whole.md — changeset ✓
  • packages/core/test/kilocode/effect-zod.test.ts — new tests ✓
  • packages/kilo-vscode/src/KiloProvider.ts — session.updated handler refactored ✓
  • packages/kilo-vscode/src/kilo-provider-utils.ts — applySessionPatch / sessionPatchToWebview added ✓
  • packages/kilo-vscode/tests/unit/kilo-provider-utils.test.ts — new tests ✓
  • packages/kilo-vscode/webview-ui/src/context/session.tsx — revert-change guard added ✓
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts — SessionUpdate wired in ✓
  • packages/kilo-vscode/webview-ui/src/types/messages/sessions.ts — SessionUpdate type added ✓

Reviewed by claude-4.6-sonnet-20260217 · 896,532 tokens

Review guidance: REVIEW.md from base branch main

@marius-kilocode

Copy link
Copy Markdown
Collaborator Author

Provider inventory audit

Compared the Kilo provider stack immediately before the upstream merge (372a406298, OpenCode v1.14.48) with the PR head (d6cde9fc4a, OpenCode v1.14.51). I treated the live models.dev catalog, legacy provider loaders, Kilo-only overlays, and the new v2 provider plugins as separate surfaces so architecture moves are not mistaken for provider removals.

Summary

Surface Before After Result
Online provider catalog Loaded dynamically from https://models.dev/api.json Same catalog, now loaded through packages/core No provider IDs removed
Legacy custom loaders 21 provider-specific loaders The same 21 provider-specific loaders Preserved exactly
Bundled AI SDK factories 23 upstream factories plus @kilocode/kilo-gateway The same 23 factories plus @kilocode/kilo-gateway Preserved exactly
Kilo Gateway Runtime model injection and Kilo SDK loader Same legacy path plus a dedicated v2 KiloPlugin Preserved and covered in v2
Apertis Kilo-injected legacy provider Still Kilo-injected in the legacy provider list Preserved in v1, not yet mirrored into v2
GitHub Copilot Enterprise Kilo-only legacy loader Same Kilo-only legacy loader Preserved in v1, not yet mirrored into v2
DigitalOcean Existing models.dev provider with API-key support Adds OAuth and dynamic Inference Router discovery Capability added, not a new provider ID
Custom/config providers Generic runtime package loading Legacy loading remains, v2 adds DynamicProviderPlugin Preserved

Provider-by-provider implementation comparison

The following table covers every provider-specific plugin in the new v2 stack. “Generic” means the provider already existed in the models.dev catalog and used the shared AI SDK path before this PR.

Provider ID Before v1.14.48 After v1.14.51 Classification
alibaba Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
amazon-bedrock Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
anthropic Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
azure-cognitive-services Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
azure Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
cerebras Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
cloudflare-ai-gateway Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
cloudflare-workers-ai Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
cohere Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
deepinfra Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
gateway Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
github-copilot Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
gitlab Explicit legacy loader and discovery Legacy loader plus dedicated v2 plugin Preserved
google Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
google-vertex-anthropic Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
google-vertex Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
groq Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
kilo Kilo Gateway legacy loader Legacy loader plus dedicated v2 Kilo Gateway plugin Preserved
llmgateway Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
mistral Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
nvidia Explicit loader, never autoloaded Explicit loader autoloads only when configured, plus v2 plugin Preserved, autoload behavior changed intentionally
opencode Kilo override prevents unauthenticated autoload Same legacy override plus dedicated v2 plugin Preserved
OpenAI-compatible providers Generic dynamic SDK path Same legacy path plus OpenAICompatiblePlugin Preserved
openai Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
openrouter Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
perplexity Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
sap-ai-core Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
togetherai Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
vercel Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
venice Generic bundled SDK Dedicated v2 plugin Preserved, v2 handler added
xai Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
zenmux Explicit legacy loader Legacy loader plus dedicated v2 plugin Preserved
Other models.dev/config providers Generic dynamic SDK loading DynamicProviderPlugin fallback Preserved

Additions and removals

Change Provider IDs Notes
Added provider IDs None DigitalOcean already existed as a catalog provider; this PR adds OAuth and router discovery
Removed from normal online catalog None Both versions load provider IDs dynamically from models.dev
Kilo-only providers preserved kilo, apertis, github-copilot-enterprise All remain in the legacy production path
Kilo-only v2 coverage gap apertis, github-copilot-enterprise These do not have dedicated v2 catalog plugins yet

Bundled fallback snapshot caveat

The new checked-in packages/core/src/models-snapshot.js contains 118 provider IDs. The generated pre-merge fallback artifact and the current live models.dev catalog contain 140. These 22 IDs are absent only from the offline bundled fallback:

alibaba-token-plan, ambient, anyapi, atomic-chat, auriko, claudinio, crof, databricks, freemodel, gmicloud, inceptron, lilac, merge-gateway, nearai, orcarouter, poolside, routing-run, sarvam, snowflake-cortex, stepfun-ai, umans-ai-coding-plan, xpersona.

They are still returned by the live models.dev API and remain loadable through the dynamic provider path, so this is snapshot staleness rather than an online provider removal. It does mean those providers are unavailable when Kilo must fall back entirely to the bundled snapshot.

Conclusion

No provider was removed from the normal online Kilo provider catalog by this merge. The main changes are the parallel v2 plugin architecture and new DigitalOcean OAuth/router support. The two follow-ups worth tracking are refreshing the bundled fallback snapshot and deciding whether Apertis and GitHub Copilot Enterprise need first-class v2 catalog support before clients move fully to the v2 provider API.

@marius-kilocode

Copy link
Copy Markdown
Collaborator Author

Merge decision record

This PR is the cumulative OpenCode v1.14.49, v1.14.50, and v1.14.51 integration on top of Kilo's v1.14.48 base (372a406298). It crossed a larger architectural boundary than the previous merge: provider/model assembly moved into packages/core, Effect services replaced more Promise and Zod facades, persisted versioned sync events replaced several transient events, and the CLI/TUI/server stacks were reorganized around those changes.

The merge touched 802 upstream files. Automation and rerere reduced 130 initial conflicts to 90 manual conflicts. The general resolution rule was the same as the previous merge: adopt upstream architecture and bug fixes, preserve Kilo product behavior through Kilo-owned code or the narrowest possible marked hook, and skip upstream products and infrastructure that do not exist in the Kilo monorepo.

Scope decisions made before manual resolution

  • Targeted v1.14.51 cumulatively rather than making separate .49, .50, and .51 branches. The later releases directly modify architecture introduced in .49, so resolving them independently would duplicate work and produce incompatible intermediate branches.
  • Kept one writable resolver and treated the generated upstream, Kilo-main, and auto-merge worktrees as read-only evidence.
  • Skipped upstream-only packages/app, packages/desktop, packages/console, packages/web, enterprise/function/slack packages, SST infrastructure, and upstream publish/deploy workflows. Kilo has different products and release infrastructure for those surfaces.
  • Accepted package transforms for shared packages, preserving Kilo package names, workspace dependencies, versions, registry settings, and the Bun 1.3.14 pin.
  • Treated generated OpenAPI, SDK, docs command tables, source links, and lockfiles as regeneration outputs rather than hand-resolving generated text.

Manual conflict resolutions by domain

Domain Main conflict surface Integration decision and rationale
Provider and model architecture packages/core/src/{aisdk,catalog,model,models,plugin,provider}.ts, packages/core/src/plugin/provider/**, packages/opencode/src/provider/** Adopted upstream's ProviderV2/ModelV2/Catalog/PluginV2 architecture instead of restoring the old monolith. Kept the legacy provider path because current CLI and extension consumers still depend on it. Ported Kilo Gateway into a dedicated v2 provider plugin, retained Kilo/Apertis model overlays, retained GitHub Copilot Enterprise and custom-provider loading, and preserved Kilo headers, auth, org IDs, anonymous models, model metadata, small-model selection, and branded provider behavior. DigitalOcean remains the same catalog provider ID but gains OAuth and dynamic Inference Router discovery. The complete provider inventory is in the separate provider audit comment.
Effect runtime and schema migration packages/core/src/effect-zod.ts, packages/core/src/process.ts, packages/opencode/src/effect/**, src/config/**, src/kilocode/fn.ts Adopted Effect-native services, schemas, typed errors, AppProcess, AppFileSystem, InstanceState, and explicit layers. Preserved the small Effect-to-Zod compatibility bridge because Kilo config and exported APIs still require Zod statics and JSON-schema conversion. Reintroduced the old fn behavior under src/kilocode/fn.ts rather than restoring removed upstream utility code. Consolidated Kilo env switches in RuntimeFlags and added explicit layers in Kilo-owned compositions and fixtures.
Config, agents, commands, permissions src/config/{config,agent,command,permission,provider}.ts, src/agent/**, src/kilocode/config/** Adopted upstream Effect schemas, generated-agent objects, default-agent resolution, layered permission behavior, and config diagnostics. Preserved Kilo config overlays, default plugins, speech/indexing/telemetry defaults, provider extensions, plan follow-up state, and TUI config migration. Scout's Kilo codesearch permission and tool were restored after upstream removed the tool, because Scout still relies on repository search. Parent-to-subagent permission handling follows upstream's new architecture while retaining Kilo task-level security checks.
Session data and versioned events src/session/{session,message-v2,projectors,sync}.ts, src/sync/**, src/v2/** Adopted persisted *.1 sync events for sessions, messages, and parts, plus upstream partial session patches and usage persistence. Preserved Kilo session metadata, platform attribution, cost fields, recovery, sharing/export hooks, and workspace isolation. Consumers now merge partial session.updated.1 payloads instead of replacing full sessions. A compatibility normalizer accepts both the runtime { syncEvent: { type, ... } } envelope and generated SDK { name, ... } shape so mixed CLI/server paths do not silently drop events.
Prompt processing, retry, compaction src/session/{prompt,processor,retry,compaction,llm}.ts Adopted upstream cancellation finalization, busy-state behavior, recent-tail compaction, repeat-compaction prevention, typed provider errors, and Effect loops. Preserved Kilo compaction chunking and caps, payload recovery, old tool-output pruning, queueing, overflow recovery, network retry behavior, prompt-cache continuity, session export rules, and permission refresh. LiteLLM behavior follows the upstream minimum-version decision, while GitHub Copilot retains its required stub-tool compatibility path.
Snapshots and diffs src/snapshot/index.ts, src/session/summary.ts, snapshot tests Rebuilt the conflict around upstream AppProcess, AppFileSystem, cleanup, and diff semantics while preserving Kilo's patch-free SummaryFileDiff, ACP disabling, tracking timeout/progress, batched full diffs, bounded cache, deduplication, and project-scoped service state. State remains service-local so one extension backend can serve multiple directories without cross-project cache keys colliding.
HTTP API, SSE, and generated SDK src/server/routes/instance/httpapi/**, src/server/server.ts, packages/sdk/** Adopted upstream Effect HttpApi composition, v2 model/provider endpoints, typed handler failures, SSE changes, and route organization. Preserved Kilo route groups, auth, workspace routing, Kilo Gateway proxy semantics, UI no-proxy behavior, mDNS branding, and error-body contracts. Event streams remain open and tolerate unrelated indexing events. OpenAPI and SDK artifacts were regenerated after source resolution, including again when later main drift conflicted in types.gen.ts.
CLI run mode src/cli/cmd/run.ts, src/cli/cmd/run/**, src/cli/cmd/{stats,models,providers}.ts Adopted upstream event and runtime changes while preserving non-interactive exit behavior, JSON draining, interactive footer mode, leading-dash prompt handling, Kilo branding, subagent routing, cost output, and attachment handling. A shared event normalizer maps the new sync events into the legacy run transport instead of teaching every renderer both wire formats.
TUI event sync and lifecycle src/cli/cmd/tui/{app,context,component,routes,config}/** Adopted upstream session pinning/recent switching, prompt-race fixes, wide-character cursor behavior, notification/attention infrastructure, config diagnostics, and hidden line commands. Preserved Kilo plugin startup, keybinds, provider/model UI, session routing, question behavior, branding, and exit semantics. The initial resolution exposed a real wire-shape regression where prompts completed on the backend but assistant output never rendered; normalizeSyncEvent() now bridges the runtime and SDK shapes.
TUI indexing status src/kilocode/plugins/sidebar-indexing.tsx, home-footer.tsx, session footer/index Removed duplicate inline/footer indicators and placed indexing in a dedicated Kilo sidebar plugin. This fixes IDX Disabled jumping above the transcript after the home-to-session transition and gives active indexing one stable location. The label formatter was simplified and polling is scoped to the mounted plugin.
Tools, background tasks, and costs src/tool/{registry,task,task_status,shell,read,apply_patch}.ts, src/kilocode/tool/**, src/background/job.ts Adopted upstream experimental background jobs and task-status surfaces. Preserved Kilo direct-child ownership checks, nesting limits, permission propagation, task model selection, resume attribution, platform metadata, child-cost propagation, cancellation, and filesystem permission boundaries. codesearch was restored as a Kilo-retained tool after review showed that adopting the upstream deletion broke Scout's intended behavior.
Files, ripgrep, LSP, patching src/file/**, src/lsp/**, src/patch/**, src/tool/{read,grep,apply_patch}.ts Adopted Effect process/filesystem services and updated call signatures. Preserved absolute and worktree-relative permissions, rich document/image reads, encoding fallbacks, output budgets, patch behavior, and lightweight TypeScript LSP handling. Windows now avoids the MSYS rg.exe exposed by Git for Windows and uses the bundled native binary, while retaining the explicit . target required for correct enumeration.
Worktrees, projects, storage src/worktree/index.ts, src/project/**, src/storage/**, session usage migration Adopted typed worktree errors, optional detached-head branches, AppProcess execution, Effect storage, and persisted session usage. Preserved Kilo worktree cleanup, project/bootstrap behavior, Agent Manager isolation, workspace routing, and historical JSON migration. Worktree cleanup remains tied to the Kilo control-plane lifecycle rather than restoring deleted upstream facades.
Images and attachments src/image/image.ts, prompt/read paths, Photon patch Adopted upstream automatic image resizing and updated attachment limits. Preserved compiled-binary Photon lookup, MIME/signature validation, local-file normalization, early size checks, and non-image attachments. The Kilo Photon path remains a narrow packaging adaptation rather than forking the image pipeline.
MCP, plugins, and skills src/mcp/**, src/plugin/**, src/skill/** Adopted upstream MCP OAuth/lifecycle changes, plugin loader behavior, DigitalOcean auth, and the default customize-opencode skill. Preserved Kilo internal auth plugins, .kilo config/skills precedence, builtin kilo-config, workspace adapters, and pure-mode/default-plugin switches. Skill tests were updated to distinguish bundled skills from filesystem discovery instead of hiding bundled additions.
VS Code extension and Agent Manager packages/kilo-vscode/src/{KiloProvider,kilo-provider-utils}.ts, src/services/cli-backend/** Migrated the extension boundary from the old Event union to GlobalEvent[\"payload\"]. Sync events are unwrapped once, directory/session IDs are resolved from the new payloads, and partial session updates are merged into tracked state. This preserves sidebar/editor streaming, title/cost/status updates, provider settings, permissions, Agent Manager directory routing, and session deletion. We did not start a second backend or introduce per-worktree SSE connections; the existing shared backend remains the isolation boundary.
Shared UI and markdown packages/ui/src/components/{icon,message-part,session-diff,markdown}.tsx, Kilo markdown helpers Adopted upstream SVG sprite icons, structured diff metadata, partial-patch rendering, and accumulated streaming text. The sprite was explicitly hidden after visual testing showed its raw container could affect layout. Later main synchronization brought Kilo's incremental markdown DOM work into this branch; those changes were accepted from main rather than re-resolved as upstream behavior.
LLM and HTTP recorder packages packages/llm/**, packages/http-recorder/** Adopted upstream protocol cache policy, tool-stream lifecycle, provider usage normalization, and recorder refactoring as one architecture unit. Kilo-specific cache accounting and protocol tests were retained rather than selectively porting individual protocol hunks into the old package shape.
Generated artifacts and docs packages/sdk/**, packages/kilo-docs/**, source links, command tables Regenerated from merged endpoints and commands. This avoided preserving stale generated conflicts and brought v2 provider/model APIs, session event shapes, and CLI command documentation into one consistent schema. The local upstream merge report remains intentionally untracked.
CI and workflow policy .github/workflows/**, script/check-workflows.ts, package manifests Preserved Kilo release, review, test, container, and publishing policy. Unsupported upstream workflows were skipped or moved under disabled/ rather than allowed to start running in Kilo CI. Workflow allowlists, source-link checks, forbidden-string checks, annotations, and generated-artifact ratchets were updated only where the merged architecture changed their classified surface.

Post-conflict regressions found and corrected

The textual conflict pass was not sufficient for this merge. Cross-package typechecking, runtime tests, and manual product checks found several semantic breaks that were fixed before the branch was considered integrated:

  • Kilo Gateway v2 dispatch: the new core provider path initially treated Kilo as a generic OpenAI-compatible endpoint, so CLI models failed while the extension's legacy path still worked. A dedicated KiloPlugin now selects @kilocode/kilo-gateway, forwards stored/OAuth/env credentials and org IDs, preserves anonymous models, and uses the Kilo model-family dispatch.
  • TUI responses missing: backend messages completed, but the full TUI consumed a different sync-event envelope than the generated SDK type described. The event normalizer restores streamed Auto and Anthropic responses.
  • Indexing placement: the status was rendered in both home/footer-era locations and moved when the session route mounted. It now lives only in the sidebar plugin.
  • Extension SSE migration: old message/session event cases no longer existed in the SDK union. The extension now handles sync and transient payloads explicitly and preserves session routing across sidebar, editor tabs, and Agent Manager.
  • Windows file search: Git for Windows exposed an MSYS ripgrep binary that failed under native spawning. Windows skips system lookup and uses the bundled executable.
  • Event-stream tests: indexing events can legitimately arrive after server.connected. SSE checks now ignore unrelated events rather than treating any intervening event as closure or delivery failure.
  • Provider branding and headers: provider plugins moved to packages/core; Kilo referer/title/source and NVIDIA billing-origin behavior were restored in the new plugin locations.
  • Scout search: upstream removed codesearch; review confirmed Kilo's Scout still expects it, so the tool, registry entry, permission, and focused coverage were restored.
  • Effect test layers: Kilo fixtures that constructed services directly were migrated to explicit RuntimeFlags, Config, Bus, scope, and background-job layers rather than hiding missing dependencies in production code.

Later main synchronization

The PR was synchronized with Kilo main twice while open.

  1. The first merge incorporated active Kilo fixes and produced one conflict in the extension SSE adapter. The resolution kept the PR's canonical GlobalEvent[\"payload\"] typing and accepted main's removal of noisy heartbeat logging.
  2. The latest merge incorporated current JetBrains session UI/tool rendering, session export restoration, task timeline behavior, incremental markdown rendering, package versions, and workflow changes. The only textual conflict was generated packages/sdk/js/src/v2/gen/types.gen.ts; it was resolved by regenerating the SDK from the merged source schema. JetBrains and incremental markdown changes in the final PR diff are therefore current-main synchronization, not OpenCode conflict ports.

Known tradeoffs and follow-ups

  • The online provider catalog is preserved, but the checked-in offline model snapshot is behind the live models.dev catalog by 22 provider IDs. Details are in the provider audit comment.
  • Apertis and GitHub Copilot Enterprise remain supported by the legacy production provider path but do not yet have dedicated v2 catalog plugins.
  • The server currently emits a sync wire envelope that differs from the generated SDK shape, so compatibility normalization remains necessary until the wire and schema converge.
  • Session partial-update merge logic must be revisited when upstream adds fields to Session.Info; full replacement is no longer safe.
  • codesearch is intentionally retained in a shared upstream path with a marker. A future upstream reintroduction will require a normal conflict resolution.
  • The experimental background-job service follows upstream scope ownership. Kilo task ownership and cleanup checks remain the product-level guard around it.

Reviewer focus

The highest-value semantic review areas are:

  1. Kilo Gateway auth, model-family dispatch, and legacy/v2 provider parity.
  2. Versioned sync-event normalization across CLI run, full TUI, VS Code, and Agent Manager.
  3. Session partial updates, compaction/recovery, snapshots, and cost propagation.
  4. Task ownership, permissions, background cancellation, and Scout codesearch retention.
  5. Windows file search, worktree isolation, and compiled image handling.
  6. Generated SDK consistency and the distinction between upstream integration changes and later main synchronization.

This is the intended behavior and tradeoff record for the conflict resolution. It is meant to let reviewers evaluate the integration by subsystem without reconstructing 90 manual conflicts from the merge commits.

@marius-kilocode
marius-kilocode disabled auto-merge June 10, 2026 11:55
@marius-kilocode
marius-kilocode merged commit a17c167 into main Jun 10, 2026
24 of 25 checks passed
@marius-kilocode
marius-kilocode deleted the marius-kilocode/kilo-opencode-v1.14.51 branch June 10, 2026 12:27
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
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.