feat(tools): audit, fix three bugs, add multi_edit / glob_files / todo_write#52
Merged
Conversation
The validator destructured params.search_in_folder, but the LLM-facing parameter name (per prompts.ts) is include_pattern. Every call that specified include_pattern was silently ignored — the destructured value was undefined and the validator returned includePattern: null. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…meout If CommandDetection capability doesn't mount within 10s, the previous code skipped the resolve path entirely, leaving waitUntilDone as a dead promise. The only resolver was waitUntilInterrupt (idle timeout). Commands then appeared to complete but returned stale buffer contents read after the inactivity timeout fired. Surface a clear error so the model can diagnose and retry, instead of silently returning incorrect output. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A stale comment block for an unimplemented pathname_search tool was left above search_pathnames_only. It served no purpose and was easy to mistake for a live definition while reading the file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three new agent tools to close gaps versus Claude Code / Cursor / OpenCode: - multi_edit — atomic multi-block search/replace on a single file. Pre-checks every old_string exists in the file before applying anything; if any block would miss, no edits are written. Supports replace_all per edit. Builds on the existing applySearchReplaceBlocks engine. Approval class: 'edits'. - glob_files — file listing by glob pattern, sorted by modification time newest-first. Returns mtime + size per file. Limit clamped 1–1000. Closes the gap with Claude Code's Glob — search_pathnames_only is substring-only and unsorted. - todo_write — model-managed task list, per-session. Enforces a single in_progress task at a time. Returns acknowledgment + count; the stored array is exposed via ToolsService.getLatestTodos() for future UI rendering (separate PR). All three include validators that accept either array values or JSON-string values (LLMs sometimes serialize structured params as strings). Type contracts in toolsServiceTypes.ts, descriptions in prompts.ts, validators / impls / stringOfResult in toolsService.ts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Outcome of a full read-through audit of the agent tool surface. Fixes three verified bugs and adds three missing tools that close gaps versus Claude Code / Cursor / OpenCode.
Bug fixes
New tools
Audit deliverable
Companion audit document at `TOOLS_AUDIT_2026-05-25.md` in repo root (not committed in this PR — intended as a working reference, not project doc). It includes the full 29-tool inventory, competitor matrix, design issues with the four "actor" tools (`extract_function` / `rename_symbol` / `automated_code_review` / `generate_tests` describe taking actions but only return data), and recommended follow-ups.
Verification
Follow-ups (not in this PR)