Skip to content

fix(cli): isolate indexing from tool registry#9615

Merged
marius-kilocode merged 1 commit into
mainfrom
flicker-fibula
Apr 28, 2026
Merged

fix(cli): isolate indexing from tool registry#9615
marius-kilocode merged 1 commit into
mainfrom
flicker-fibula

Conversation

@marius-kilocode
Copy link
Copy Markdown
Collaborator

@marius-kilocode marius-kilocode commented Apr 28, 2026

Summary

  • Fixes the tool-registry regression introduced by feat: implement codebase indexing #6966 (feat: implement codebase indexing).
  • Keeps question, read, suggest, and other non-indexing tools available when semantic indexing fails to load or is still starting.
  • Adds regression coverage that interactive tools remain registered while indexing startup is unavailable.

Root Cause

#6966 moved semantic indexing onto shared startup paths: KiloToolRegistry imported KiloIndexing/SemanticSearchTool at module load time, and KilocodeBootstrap.init() ran KiloSessions.init() and KiloIndexing.init() together via Promise.all. As a result, an indexing import/init failure could abort the entire shared tool registry or Kilo session bootstrap path, making unrelated tools such as question, read, and suggest unavailable.

Fix

This PR lazy-loads indexing only where indexing is actually needed. Indexing failures now degrade to omitting semantic_search, while normal tool registration and session/view/question status syncing continue independently.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 28, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • .changeset/tool-registry-indexing.md
  • packages/opencode/src/kilocode/bootstrap.ts
  • packages/opencode/src/kilocode/server/routes/indexing.ts
  • packages/opencode/src/kilocode/tool/registry.ts
  • packages/opencode/src/tool/registry.ts
  • packages/opencode/test/kilocode/tool-registry-indexing.test.ts

Reviewed by gpt-5.5-2026-04-23 · 559,626 tokens

@marius-kilocode marius-kilocode merged commit 0907c6f into main Apr 28, 2026
17 checks passed
@marius-kilocode marius-kilocode deleted the flicker-fibula branch April 28, 2026 11:02
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.

3 participants