grep tool passes empty file type to ripgrep
Maintainer antworten meist innerhalb von 1 Tag
@ahmadbilaldev arbeitet bereits daran.
Seit 22.10.2026.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 68/100
Rechercherichtung
Beginne mit der Implementierung des integrierten grep-Tools und dem Einstiegspunkt, der seine ripgrep-Argumente erstellt. Reproduziere das Problem mit einem Glob und einem nicht gesetzten type und überprüfe anschließend, dass kein leerer type übergeben wird und nicht unterstützte type-Werte einen eindeutigen Fehler erhalten. Führe die vorhandenen Tests des grep-Tools aus, falls vorhanden, und ergänze Abdeckung für beide Fälle.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I asked Command Code to search my project log files for errors using its built-in search tools. Command Code invoked its grep tool, but the search failed before it searched anything.
What I expected
When I ask Command Code to search matching log files with a pattern such as:
- Glob:
**/*.log - Pattern:
error|exception|failed|failure|fatal|critical|warning|stack trace|traceback
I expect Command Code's search tool to search the matching files. If no file type is selected, the tool should search based on the glob alone.
What happened
Command Code's grep tool returned:
grep: rg: unrecognized file type:
This indicates that the tool is passing an empty type value to ripgrep, effectively invoking something like:
rg --type '' ...
Command Code also tried using type: "text", which returned:
grep: rg: unrecognized file type: text
text is not a registered ripgrep file type.
I did not run grep, rg, or the file search manually. Command Code invoked the search tool as part of handling my request.
How to reproduce
- Run Command Code
1.14.0on macOS. - Ask Command Code to search project log files for errors.
- Command Code invokes the built-in
greptool with a valid project path,glob: "**/*.log", and an error pattern. - Leave the file type empty or unset.
- Observe
rg: unrecognized file type:. - Setting the type to
textproducesrg: unrecognized file type: textinstead.
Environment
- Command Code:
1.14.0 - macOS 26.4, ARM64
- zsh (
/bin/zsh)
Workaround
Command Code worked around the problem by using its glob tool to locate log files and then opening the files individually with read_file. That worked, but it is inconvenient for large or numerous log files and does not provide the normal search/context behavior.
I was asking Command Code to investigate real application failures in the logs, including database connection errors, missing database tables, missing PHP classes, an unknown ActiveRecord property, and audit-log schema errors. I have not included any credentials or tokens that were present in those logs.
Possible fix
The type field should be optional, and an empty value should not be passed to ripgrep. The tool could also validate file types against ripgrep's registered types and return a clear validation error for unsupported values.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 4.2k
- Forks
- 377
- Ø Merge
- 1 T. 17 Min.
- Gemergte PRs (30 T.)
- 7
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus CommandCodeAI/command-code
-
Provider /v1/messages rejects role:"system" inside messages[] — Claude Code ≥ 2.1.154 incompatibleOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
CommandCodeAI/command-code#1085 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Feature request: auto-reconnect remote control (/rc) after restartEvtl. vergeben @aliarain hat das vor 20 Tagen übernommen. Offenp2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
CommandCodeAI/command-code#992 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
CommandCodeAI/command-code#933 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
CommandCodeAI/command-code#855 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
CommandCodeAI/command-code#608 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in CommandCodeAI/command-code
Ähnliche Issues
-
status: needs triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
mastra-ai/mastra#30109 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
removed_extensions notice keeps firing after a KB declares the former cascade types in kb.yamlOffenbug good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
pyrite-wiki/pyrite#1468 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:cli kind:docs prio:low
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
nb stats: the high-error-rate anomaly and the error-causes line give different cause splits for the same errorsEvtl. vergeben @jeanibarz hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 89/100
jeanibarz/agent-notebook#418 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: cli priority: P2 type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
appandflow/stim#5509 ·
Maintainer antworten meist innerhalb von 1 Tag