Repository navigation
fix(cli): surface real tool name when tool call repair fails #13446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
johnnyeric
merged 9 commits into
Kilo-Org:main
from
maphew:fix/repair-invalid-tool-surfaces-real-name
Sep 1, 2026
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9b8fbca
fix(cli): surface real tool name when tool call repair fails
maphew 43709d7
Merge branch 'main' into fix/repair-invalid-tool-surfaces-real-name
maphew f6176d6
refactor(tool): remove orphaned invalid tool
maphew b7bf5f4
Merge branch 'main' into fix/repair-invalid-tool-surfaces-real-name
maphew 4c2b02e
Revert "refactor(tool): remove orphaned invalid tool"
maphew a95ffee
chore: merge upstream main into fix/repair-invalid-tool-surfaces-real…
maphew 06ddb80
Merge remote-tracking branch 'upstream/main' into fix/repair-invalid-…
maphew ac6f4e0
ci: re-trigger pipeline (flaky background-process teardown on loaded …
maphew 848dddb
Merge commit 'bbf6a278' into fix/repair-invalid-tool-surfaces-real-name
maphew File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@kilocode/cli": patch | ||
| --- | ||
|
|
||
| Surface the actual tool name when the model calls an unavailable tool, instead of a confusing "unavailable tool 'invalid'" error. Malformed tool calls that cannot be repaired now report the real tool name and available tools, so the model can self-correct. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning
nullfrom the repair callback is sufficient to correct the reported behavior, but this hunk also begins an unnecessary cleanup that deletes the upstreaminvalidtool and modifies its registry, CLI renderer, and schema tests across five shared files. Retaining that now-unused definition avoids expanding Kilo's upstream delta and the resulting merge-conflict surface; the repository explicitly requires shared-file changes to be minimal and prohibits unnecessary upstream refactoring.AGENTS.md reference: AGENTS.md:L185-L190
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: the invalid-tool cleanup was reverted in 4c2b02e (
Revert "refactor(tool): remove orphaned invalid tool"), restoringpackages/opencode/src/tool/invalid.ts, the registry registration, the TUI renderer, and the schema test/snapshot to their upstream state. The branch now touches only the repair callback insession/llm.tsplus its regression test and changeset — the upstream diff is minimal again.