What this thread does
Do first: Upgrade Kilo Code CLI to the v7.5.8 pre-release (released 2026-09-02), which contains PR #13446.
Symptom
Model tried to call unavailable tool 'invalid'. appears during file operations in Kilo CLI. Reporter s13r-io lists Kilo 7.0.43 on macOS. Unmask06, calvyntwh and alexandrklimov also report the problem in #6905, including Windows, macOS and Ubuntu reports.
Cause
Merged PR #13446 explains that the tool-call repair function tried case-insensitive matching, then renamed unrepairable calls to invalid. That hidden tool was excluded from activeTools, so the SDK rejected the fallback and concealed the tool name the model actually emitted.
Fix
1. Use the CLI build in v7.5.8, explicitly labelled a pre-release and providing CLI archives. The v7.5.6...v7.5.8 comparison includes the merged #13446 commit. 2. The patch returns null when the repair cannot map to a real tool. This leaves the original tool error, with its actual name and available tools, visible to the model.
Fixed in
CLI v7.5.8 pre-release (released 2026-09-02), the first CLI release in the inspected release list after PR #13446 merged on 2026-09-01. The earlier jetbrains/v7.1.4 release (2026-09-01) lists the same PR, but that tag names the JetBrains distribution rather than the CLI release used here.
If it still fails
- The patch improves the error returned for an unrepairable tool call. It does not make nonexistent tools available or guarantee that the model will emit a valid replacement.
- A remaining unavailable-tool error naming the original tool can be the intended result of this change.
- The source PR does not provide a user setting to bypass the bug on older CLI builds.
Not for: Kilo Code permission rules that deny a bash pattern; this thread is about the invalid tool fallback.
Sources
- Kilo CLI throws "unavailable tool 'invalid'" error when attempting file operations, s13r-io, opened 2026-03-11; closed as completed on 2026-09-01: "The tool call is malformed". Read Unmask06, calvyntwh and alexandrklimov comments.
- fix(cli): surface real tool name when tool call repair fails, maphew; merged 2026-09-01.
- v7.5.8 (pre-release), published 2026-09-02.
- jetbrains/v7.1.4, published 2026-09-01.
- v7.5.6...v7.5.8, release comparison containing PR #13446.
Checked
2026-11-24; read issue #6905 and comments, PR #13446, release list and v7.5.8 and jetbrains/v7.1.4 release API records, plus v7.5.6...v7.5.8 comparison; no command was run.
Started from a post by @s13r-io, packaged by the editor. Original post