crush icon indicating copy to clipboard operation
crush copied to clipboard

Crush fails to create directories when generating project with error tool not found: bash_commands

Open amitdawle opened this issue 1 month ago β€’ 3 comments

Description

I am trying to generate a simply python app using Crush. My prompt was

Create appropriate directories for a python project and then creat an app in python that will allow two users to play tick tac toe game. The app should a be a local python server with a clean UI and I should be able to run it using pycharm.

I see the following on the terminal

We need to create directories: app, app/static, app/templates, possibly app/tests, app/init.py, maybe requirements.txt. Then create app file with Flask server.

Let's write the code. We'll create app.py.

We must read files before editing. No existing files.

Let's create directories via bash.

Γ— bash_commands {"command":["bash","-lc","mkdir -p app/static app/templates \u0026\u0026 touch app/__init__.py app/app.py"]}

ERROR tool not found: bash_commands

The generation stops after this and I see the prompt again. No directories or files are generated.

Version

Crush version v0.18.1 (Installed via homebrew)

Environment

macOS Sequoia 15.6.1 Using Ollama with gpt-oss:20b

amitdawle avatar Nov 15 '25 16:11 amitdawle

Thanks for reporting this! I did some investigation and found that Crush has a tool called bash (not bash_commands), which might explain the error.

A few questions to help debug this:

  1. Can you share your Crush configuration? Specifically the provider and model setup in your ~/.config/crush/crush.json?

  2. What does the model see? Could you try asking the model directly: "What tools do you have available? Please list them." This will show us if Ollama is properly presenting Crush's tools to the model.

  3. Does it work with other models? If you have access to another model (like Claude or GPT-4), does the same prompt work correctly?

My hypothesis is that either:

  • The tool definitions aren't being passed correctly from Crush β†’ Ollama β†’ gpt-oss:20b
  • Or the model is hallucinating a tool name based on its training data

The bash tool should handle exactly what you're trying to do (mkdir, touch, etc.), so if we can figure out why the model isn't seeing it, we can fix this.

novalis78 avatar Nov 17 '25 20:11 novalis78

@novalis78 Thank for looking into this.

My config is as below

{ "$schema": "https://charm.land/crush.json", "providers": { "ollama": { "name": "Ollama", "base_url": "http://localhost:11434/v1/", "type": "openai", "models": [ { "name": "GPT OSS 20B", "id": "gpt-oss:20b", "context_window": 131072 , "default_max_tokens": 20000 }, { "name": "Qwen3 Coder 30B", "id": "qwen3-coder:30b", "context_window": 262144 , "default_max_tokens": 20000 }, { "name": "Qwen3 30B", "id": "qwen3:30b", "context_window": 262144 , "default_max_tokens": 20000 } ] } } }

` What tools do you have available? Please list them.

Commands: bash, find_all, find_references, find_replace, find_usage, find_version, grep, git_blame, git_log, get_tool_spec, gitlog_run, get_file_hash, git_branch.Need to list available functions.

Γ— list {"name":"list"}

ERROR tool not found: list`

I do not have Claude yet but could try with another model.

amitdawle avatar Nov 18 '25 20:11 amitdawle

I'm also having this issue with Crush v0.19.2 + gpt-oss:20b via Ollama.

My config:

{
	"$schema": "https://charm.land/crush.json",
	"options": {
		"disable_metrics": true
	},
	"providers": {
		"ollama": {
			"name": "Ollama",
			"base_url": "http://localhost:11434/v1/",
			"type": "openai-compat",
			"api_key": "ollama",
			"models": [
				{
					"name": "GPT OSS 20B",
					"id": "gpt-oss:20b",
					"context_window": 131072,
					"default_max_tokens": 20000
				}
			]
		}
	}
}

I wrote the following prompt, and got an error for bash_commands:

Create a "Hello World" HTML file named index.html in this folder

Γ— bash_commands {"cmd":["bash","-lc","echo '\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u0…

 ERROR  tool not found: bash_commands

As suggested, I asked which tools were available, and bash_commands was listed:

What tools do you have available? Please list them.

You can use the following tools:

β€’ bash – execute shell commands (via the  bash  tool).
β€’ Agent – a custom search and analysis tool that can run complex queries across the filesystem.
β€’ bash_commands – a wrapper for running Bash commands with contextual explanations.
β€’ search – text search across the repository.
β€’ grep – pattern matching in files.
β€’ find_references – find usages of a function or variable.
β€’ edit – literal edit of file contents (strict matching).
β€’ run – execute a program with specified parameters (via the  Run  tool interface).
β€’ fetch – download content from a URL (uses  curl ‑like capability).
β€’ fetch_file – fetch a file by relative path.
β€’ source – open a file (view contents, line‑based).
β€’ source_file – read a file with default line count.
β€’ fetch_file – open a file (similar to source).
β€’ source_file – read a file.
β€’ source – view a file.
β€’ edit – modify file contents.
β€’ bash – run shell commands.
β€’ agent – advanced searches across repository (internal).
β€’ lint – run linting or type‑checking if configured (via memory).

(Note: The environment lacks a native package manager or test runner, but these are the generic
utilities exposed.)

I asked it to complete the same task while avoiding the bash_commands tool, and then it choked on the Agent tool.

geoffb avatar Nov 29 '25 02:11 geoffb