Skip to content

OpenCode v1.14.48 - #10996

Merged
marius-kilocode merged 73 commits into
mainfrom
marius-kilocode/kilo-opencode-v1.14.48
Jun 8, 2026
Merged

OpenCode v1.14.48#10996
marius-kilocode merged 73 commits into
mainfrom
marius-kilocode/kilo-opencode-v1.14.48

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

1.14.47

Core

Improvements

  • Support the prompt_review_unresolved keybinding in the TUI
  • Add a path to served messages
  • Persist the last selected model per agent across TUI sessions
  • Suppress duplicate ACP updates for finalized tool parts
  • Support multiple Scout completions in a single session
  • Add coverage for duplicated ACP tool state updates
  • Improve /connect copy

Bugfixes

  • Return readable 400 errors for malformed HttpApi query and path values
  • Materialize Scout reference assets before read, glob, or grep operations
  • Correctly render absolute paths outside the project in the TUI
  • Revert the image file display adjustment
  • Use filenames instead of relative paths for TUI image handling

TUI

Bugfixes

  • Prevent the app exit shortcut from triggering while the prompt contains text

SDK

Improvements

  • Introduce schema-backed ID types and migrate IDs
  • Update v2 provider handling
  • Preserve SDK pattern metadata through the HttpApi migration

Bugfixes

  • Fix session viewed handling
  • Add OpenAPI compatibility coverage

1.14.48

Core

Improvements

  • Preserve file image attachments by wrapping final user content with tool output

Bugfixes

  • Account for modal padding when calculating maximum width

Comment thread packages/opencode/src/image/image.ts
Comment thread packages/opencode/src/image/image.ts
Comment thread packages/opencode/src/config/config.ts
@kilo-code-bot

kilo-code-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/config/config.ts 308 New attachment key added to Config.Info — must be mirrored in the cloud repo at apps/web/src/app/config.json/extras.ts (CI does not check this)

SUGGESTION

File Line Issue
packages/opencode/src/image/image.ts 194 Inner catch { return undefined } for image decode failure has no logging — failures are silently swallowed
Resolved since last review
File Line Issue
packages/opencode/src/image/image.ts 158 FIXED: Silent catch for Photon load failure now logs via log.error("failed to load Photon image processor", { err })
packages/opencode/test/cli/cmd/tui/app-exit.test.ts 16 FIXED: Redundant for...of loop with unused binding variable replaced with a direct expect(AppExit.enabled(false)).toBe(false) assertion
Other Observations (not in diff)

No additional observations.

Files Reviewed (incremental diff)
  • packages/opencode/test/cli/cmd/tui/app-exit.test.ts — SUGGESTION resolved: redundant loop removed, test name clarified

Files carried forward (unchanged from previous review):

  • packages/opencode/src/image/image.ts — silent inner catch for decode failure (SUGGESTION open)
  • packages/opencode/src/config/config.ts — cloud schema mirror needed for attachment key (WARNING open)

Overall assessment: The incremental commit resolves the unused-binding loop issue. Remaining open: one WARNING (cloud config mirror) and one SUGGESTION (silent decode catch). Code is well-tested.

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 227,486 tokens

Review guidance: REVIEW.md from base branch main

Comment thread packages/opencode/test/cli/cmd/tui/app-exit.test.ts Outdated
…opencode-v1.14.48

# Conflicts:
#	packages/opencode/test/kilocode/session-export/e2e.test.ts
@marius-kilocode
marius-kilocode enabled auto-merge June 8, 2026 19:38
…opencode-v1.14.48

# Conflicts:
#	packages/opencode/src/session/processor.ts
@marius-kilocode

Copy link
Copy Markdown
Collaborator Author

Merge decision record

This PR is the cumulative OpenCode v1.14.47 and v1.14.48 sync. It deliberately stops before v1.14.49, which is a much larger integration boundary covering broad v2 provider/model, TUI, config, app, and generated-code changes. The general resolution rule was to adopt upstream architecture and behavior, then preserve Kilo functionality through Kilo-owned helpers or the smallest possible marked hook in shared files.

Release behavior adopted without a semantic conflict

  • Typed Effect-backed IDs and OpenAPI patterns.
  • Reference repository materialization for Scout/read/glob/grep.
  • Relative TUI path rendering and the new managed-textarea keymap behavior.
  • Readable HttpApi schema rejection bodies.
  • Effect-based compaction lifecycle and SyncEvent dependencies.
  • Provider cache hints and placement behavior across Anthropic, Bedrock, Gemini, and OpenAI protocols.
  • HTTP recorder refactoring and data-migration infrastructure.
  • Image resizing and attachment limits, with Kilo packaging adaptations described below.

Manual conflict resolutions

Domain Conflicted files Resolution and tradeoff
Agent and ID architecture src/agent/agent.ts, src/id/id.ts Adopted upstream's typed ID and Reference architecture instead of restoring removed generic Identifier.schema()/.zod APIs. Kilo callers were migrated to typed schemas, and the Kilo sug prefix remains supported. This gives stricter runtime validation, so legacy/import fixtures and generated Kotlin decoding needed explicit compatibility coverage.
TUI lifecycle src/cli/cmd/tui/app.tsx Adopted upstream's dedicated app_exit binding and prompt-aware exit behavior while retaining KiloApp.init(). The predicate lives in a Kilo-owned helper, leaving a minimal shared hook. Exit keybindings do not fire for a focused non-empty prompt, while /exit, /quit, and /q remain separate command-palette paths.
HttpApi composition src/server/routes/instance/httpapi/api.ts, public.ts Adopted SchemaErrorMiddleware for bounded, readable decode/encode failures. Preserved Kilo route groups, workspace routing, generated SDK compatibility overrides, nullability/numeric corrections, and Kilo branding. Schema middleware only handles schema failures. Kilo Gateway proxy responses retain their original HTTP status/body, while model-provider failures intentionally remain rich APIError values inside successful assistant-message responses.
Session processing and compaction src/session/compaction.ts, processor.ts, test/session/compaction.test.ts Adopted upstream's Effect compaction lifecycle, reference/image services, and sync-event calls. Preserved Kilo chunking, caps, payload recovery, old tool-output pruning, protected skill output in normal pruning, queueing, retries, provider finish handling, telemetry, suggestions, and post-compaction continuation. A small Kilo-owned compatibility helper replaces callers of the removed upstream Compaction.create() facade. Emergency 413 recovery remains intentionally stronger than normal pruning and may strip protected tool output to guarantee one reduced retry.
Read/glob tools src/tool/read.ts, glob.ts Adopted upstream reference materialization while retaining Kilo worktree-relative permissions, absolute glob support, rich document/image reading, encoding fallback, directory expansion, and output budgets. The tradeoff is additional Reference service wiring in central test/runtime layers rather than bypassing the new architecture.

Post-conflict compatibility work

The textual conflicts were not the full integration surface. Generation and typechecking exposed these additional seams:

  • Ported Kilo permission, session, message, and suggestion callers to typed Effect ID schemas.
  • Added Reference, SyncEvent, Image, and schema-error middleware layers where Kilo-owned compositions build lower-level services directly.
  • Nested tool registry layers to avoid Effect's typed Layer.mergeAll argument limit.
  • Updated Kilo fixtures to valid branded IDs and kept JetBrains JSON decoding compatible with canonical, migrated, and unprefixed historical session IDs.
  • Excluded static /session/viewed from workspace session-ID extraction.
  • Regenerated OpenAPI and TypeScript SDK artifacts from the merged source schemas.

Image handling tradeoffs

Upstream introduced Photon-based resizing and limits. Kilo additionally needs Photon to work from compiled binaries, so the patch now uses __KILOCODE_PHOTON_WASM_PATH and logs the original module-load failure. The inner corrupt-image decode catch remains unchanged upstream behavior and was intentionally not modified in this sync.

If Photon cannot load, Kilo now fails closed rather than dropping every image or accepting arbitrary bytes:

  • validates canonical base64 and MIME signatures;
  • parses PNG, JPEG, GIF, and WebP dimensions from headers;
  • enforces encoded byte and dimension limits;
  • rejects oversized local image files before reading/base64 allocation;
  • normalizes both data: and file: user images before persistence;
  • preserves non-image attachments unchanged.

This fallback is intentionally narrower than a full image decoder. Unknown formats or malformed headers are rejected when Photon is unavailable.

Shell events and provider errors

  • Shell v2 events now use one callID for the persisted tool part, Shell.Started, and Shell.Ended, so projectors can correlate completion.
  • Real server/SDK coverage confirmed model-provider failures do not escape synchronous prompt handlers as HTTP errors. They remain successful assistant-message responses containing the canonical MessageV2.APIError, including status, response body, headers, metadata, and Kilo error codes. throwOnError therefore does not throw for that product-level assistant response, which is intentional.
  • Kilo Gateway transport endpoints remain normal HTTP proxy errors and are not rewritten by schema middleware.

Prompt caching and compaction safety

The merged compaction path was compared directly with pre-merge Kilo behavior:

  • old completed tool outputs still serialize as [Old tool result content cleared] after pruning;
  • attachments are removed with compacted tool results;
  • normal pruning still protects skill output;
  • post-compaction selection does not reintroduce compacted outputs;
  • provider cache-control markers remain on the same system and trailing message breakpoints;
  • the experimental event flag behavior is unchanged, since the old event facade already applied the same gate internally.

Later main synchronization conflicts

The PR has been synchronized with Kilo main multiple times while open:

  1. packages/opencode/test/kilocode/session-export/e2e.test.ts: adopted current main, which removed the network-dependent worker export case. Local deterministic worker/source-contract coverage remains.
  2. packages/opencode/src/session/processor.ts: latest main added proactive preflight compaction. The resolution preserved the PR's grouped Kilo imports and added the required KiloSessionOverflow import used by the new halt() path. The proactive compaction replay and binary payload accounting behavior remain intact.

Infrastructure and marker decisions

  • Restored Kilo's root Bun pin to 1.3.14 rather than accepting the upstream downgrade.
  • The new attachment config key is upstream-owned in v1.14.48; it is not a Kilo-only schema addition and does not require a cloud-schema mirror.
  • Unsupported upstream product packages such as upstream web/console/desktop were skipped by merge automation rather than introduced into the Kilo monorepo.
  • Shared-file Kilo deltas were re-annotated with narrow kilocode_change markers. Stale markers were removed from Kilo-owned paths and from behavior now owned by upstream.

Reviewer focus

The highest-value review areas are:

  1. Compaction replay, pruning, and prompt-cache continuity.
  2. User/tool image handling in both source and compiled CLI builds.
  3. HttpApi schema failures versus Kilo Gateway/provider error boundaries.
  4. Generated SDK and JetBrains compatibility for branded IDs.
  5. TUI exit handling and shell event correlation.

This comment describes the intended behavior and tradeoffs so a reviewer can evaluate semantic correctness without reconstructing the conflict history from the merge commits.

@marius-kilocode
marius-kilocode merged commit 21a8084 into main Jun 8, 2026
21 checks passed
@marius-kilocode
marius-kilocode deleted the marius-kilocode/kilo-opencode-v1.14.48 branch June 8, 2026 21:04
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.

9 participants