Skip to content

fix(cli): restore automatic session titles - #10998

Merged
marius-kilocode merged 1 commit into
mainfrom
voltaic-veterinarian
Jun 8, 2026
Merged

fix(cli): restore automatic session titles#10998
marius-kilocode merged 1 commit into
mainfrom
voltaic-veterinarian

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Automatic session titles can silently remain as timestamp placeholders when the configured small_model requires reasoning. The title request currently disables reasoning for Google models, so a model such as kilo/google/gemini-3.5-flash rejects it with HTTP 400: Reasoning is mandatory for this endpoint and cannot be disabled.

The title request also reuses the main session ID as its Kilo Gateway task ID. An upstream merge reverted the dedicated title ID, allowing the title request and main agent request to collide when they run concurrently.

Reproduction:

  1. Configure small_model as kilo/google/gemini-3.5-flash.
  2. Start a new session and send the first prompt.
  3. Observe that the timestamp placeholder remains instead of being replaced by a generated title.
  4. Inspect the CLI log and find the title request failing with the reasoning-mandatory HTTP 400. The title and main model requests also use the same x-kilo-task value based on the session ID.

This restores a dedicated title-<sessionID> task identity for title generation. Small requests now use model capabilities instead of model-name checks: non-reasoning models receive no reasoning option, while reasoning-capable models enable the provider-supported default without assuming that minimal, low, or another effort level exists.

@kilo-code-bot

kilo-code-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The fix is clean and the approach is sound. Both bugs are addressed correctly:

  1. Task ID collision: KiloSessionPrompt.titleID returns title-<sessionID> which is used as the sessionID parameter to llm.stream for the title request — this becomes the x-kilo-task header value, isolating it from the concurrent main agent request.

  2. Reasoning mandatory error: The model-name-based heuristic (hardcoded "google" string check + always-"minimal" effort) is replaced with model.capabilities.reasoning — if the model doesn't advertise reasoning support, no reasoning option is sent; if it does, { reasoning: { enabled: true } } defers to the provider's default effort level, which is safe across providers.

One observation (not a blocker): the openrouter and llmgateway branches also pick up the new capability-driven behavior alongside kilo-gateway. Before this PR those two branches unconditionally returned { reasoningEffort: "minimal" }. The behavior change for openrouter/llmgateway is not mentioned in the PR description but appears intentional — the same capability flag governs all three. If openrouter/llmgateway consumers ever set capabilities.reasoning: false, they'll now get {} instead of { reasoningEffort: "minimal" }, which is the correct outcome.

Tests in both session-title-generation.test.ts and the updated transform.test.ts are consistent with the implementation.

Files Reviewed (5 files)
  • .changeset/calm-titles-return.md
  • packages/opencode/src/kilocode/session/prompt.ts
  • packages/opencode/src/provider/transform.ts
  • packages/opencode/src/session/prompt.ts
  • packages/opencode/test/kilocode/session-title-generation.test.ts
  • packages/opencode/test/provider/transform.test.ts

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 601,699 tokens

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 12e83e1 into main Jun 8, 2026
21 checks passed
@marius-kilocode
marius-kilocode deleted the voltaic-veterinarian branch June 8, 2026 11:21
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
fix(cli): restore automatic session titles
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.

2 participants