-
Notifications
You must be signed in to change notification settings - Fork 286
Description
Bug Description
I use gemini that is Gemini CLI a lot. I have decided to test your grok one.
The below worked with the default Grok model (no model given), but with
export GROK_MODEL=grok-3-mini
it fails with:
Type your request in natural language. Ctrl+C to clear, 'exit' to quit.
> Reread GROK.md then. If needed, also other files, but I reckon not needed by now.
⏺ Read(GROK.md)
⎿ File contents:
Contents of GROK.md:
1: Grok, here is the dump of our chat so far, as session broke:
2:
3:
4: > Very good. This repo has files. Do this: 1. Check the files. 2. Check the `git` status and history (shortly). 3. Read `GEMINI.md` file's content here 4. Report what you understand.
5:
6: ⏺ Created Todo
7: ⎿ ○ List the files in the current directory using bash 'ls -la'
8: ○ Check git status using bash 'git status' and short history with 'git log --oneline -n 5'
9: ○ View the content of GEMINI.md using view_file
10: ○ Summarize understanding of the repo based on gathered information
... +242 lines
⏺ Function: You have successfully viewed the contents of GROK.md. Here's the output:
Contents of GROK.md:
1: Grok, here is the dump of our chat so far, as session broke:
2:
3:
4: > Very good. This repo has files. Do this: 1. Check the files. 2. Check the git status and history (shortly). 3. Read GEMINI.md file's content here 4. Report what you understand.
5:
6: ⏺ Created Todo
7: ⎿ ○ List the files in the current directory using bash 'ls -la'
8: ○ Check git status using bash 'git status' and short history with 'git log --oneline -n 5'
9: ○ View the content of GEMINI.md using view_file
10: ○ Summarize understanding of the repo based on gathered information
... +242 lines
> Never output content of files! Now go on with the task.
⏺ This task involves multiple steps based on the instructions in GROK.md. To proceed efficiently, I'll create a todo list to plan and track the tasks.
⏺ Created Todo
⎿ ○ List the files in the current directory using bash 'ls -la'
○ Check git status using bash 'git status' and short history with 'git log --oneline -n 5'
○ View the content of GEMINI.md using view_file (without outputting contents)
○ Summarize understanding of the repo based on gathered information
⏺ Updated Todo
⎿ Executing...
⏺ Sorry, I encountered an error: Grok API error: 400 "Invalid request content: The arguments to a tool_call are not a valid JSON string. Parsing error: Error("trailing characters", line: 1, column: 52)"
Restarting does not help.
Grok online advises below, but I cannot be bothered to look into grok's code and do A/B testing. For the record only:
- Recommendations
Fixing the Grok CLI Error:
Enable debug mode (if available) to inspect the JSON payload: grok --debug ....
Test individual commands (e.g., grok --prompt "Run ls -la") to isolate the failing tool call.
Update Grok CLI: npm update -g @vibe-kit/grok-cli.
If the error persists, use the cURL command with task.json to bypass CLI issues.Using Grok CLI for Repository Tasks:
Install Grok CLI if not already done: npm install -g @vibe-kit/grok-cli.
Run the consolidated prompt above or split tasks for clarity:
bashgrok --model grok-4-latest --prompt "Run ls -la"
grok --model grok-4-latest --prompt "Run git status && git log --oneline -n 5"
grok --model grok-4-latest --prompt "Summarize the repository's purpose based on GEMINI.md (Gemini CLI docs) and red_spiral.py (spiral pattern script)"
...
Steps to reproduce
No response