CommandCodeAI / CommandCodeAI/command-code

Tool Call Repair: Invalid input for tool "grep" - The tool call failed because the patterns are missing.

Open
#528 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
4k
Forks
350
PR merge metrics
No merged PRs in 30d

Description

Summary

Seeing a few tool call fails with DeepSeek v4 Pro:


✻ Thought for 1 second
  The user wants the search to also find scheduling requests for people who are associated with a company (i.e., people who work at a company),
  not just direct company/people matches. So if I search for a company name, I should also find scheduling requests where that company's people
  are listed as participants.

  Let me look at the relationship between people and companies - there's probably a `people`.`current_company` field or a `relationships` table
  that links people to companies.

⠶ Let me check how people are associated with companies.

 SEARCH  ["undefined" in files]
 │ Invalid input for tool "grep". Please correct and retry:
 └   • pattern: Invalid input: expected string, received undefined

 SEARCH  ["undefined" in files]
 │ Invalid input for tool "grep". Please correct and retry:
 └   • pattern: Invalid input: expected string, received undefined

✻ Thought for 1 second
  The tool call failed because the patterns are missing. Let me check the schema and how people relate to companies.
Expected Behavior

Not to fail.

Actual Behavior

See above

Steps to reproduce the issue

Not sure.

Command Code Version

0.40.8

Operating System

macOS

Terminal/IDE

ghostty

Shell

zsh

Additional context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named. Start by reproducing the DeepSeek v4 Pro transcript on macOS with version 0.40.8, then trace the grep tool-call path when the pattern is undefined. Done means the agent does not issue an invalid grep call and handles the missing pattern without failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
ai, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.