Why it is not creating or writing files? #4344
Replies: 1 comment
|
Your curl test is useful, but it is not exercising the same wire path as CodeWhale. CodeWhale's First, test the exact path CodeWhale uses: curl http://localhost:11434/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "qwen3-coder:30b",
"messages": [{"role":"user","content":"Call write_file to create test.txt containing hello"}],
"tools": [{
"type": "function",
"function": {
"name": "write_file",
"description": "Write a file",
"parameters": {
"type": "object",
"properties": {
"path": {"type":"string"},
"content": {"type":"string"}
},
"required": ["path", "content"]
}
}
}],
"tool_choice": "auto",
"stream": true
}'Then make the provider explicit in provider = "ollama"
[providers.ollama]
base_url = "http://localhost:11434/v1"
model = "qwen3-coder:30b"Restart CodeWhale, open it from the directory that should receive the files, and verify the selected provider/model in the TUI. Also try a minimal prompt before the full AGENTS/skill prompt: The important distinction is that a tool call is only a request from the model. Ollama never writes the file itself; CodeWhale must receive the structured call on its For reference, the repository documents the Ollama route and default If this resolves the issue, please mark the comment as the accepted answer so future users can find the protocol distinction quickly. |
Uh oh!
There was an error while loading. Please reload this page.
Am new in coding with AI and appreciate it if someone could point me the right direction.
AGENTS.md
I have this AGENTS.md in my project directory
constitution.json
mcp.json
These files are in my project/.codewhale directory
SKILL.md
This file in my project/.agents/skills/project directory.
I ran ollama with qwen3-coder:30b and put this prompt in the codewhale tui:
"Build a Tic-Tac-Toe game with moveable frames as specified in the AGENTS.md file.
I need a single-page HTML application with:
A standard 3x3 Tic-Tac-Toe grid
Each square as a draggable frame
HTML, CSS, and JavaScript (no frameworks or build tools)
Intuitive drag-and-drop interaction
Visually distinct frames
Follow the SKILL.md workflow:
Plan the UI with modern drag-and-drop capabilities using native HTML5 drag and drop
Implement core game logic first (board state, win detection) as a separate module
Connect the logic to UI components
Ensure the game works correctly after moving any frame
Remember the strict execution rules:
NO approval prompts
NO planning delays
IMMEDIATE action
YOLO override is active
Create all necessary files and implement the complete game immediately."
The problem is the codewhale ran but it didn't create any files at all. I tested the model with curl command:
"curl http://localhost:11434/api/chat
-H "Content-Type: application/json"
-d '{
"model": "qwen3-coder:30b",
"messages": [
{
"role": "user",
"content": "Call the write_file tool to create test.txt containing hello."
}
],
"tools": [
{
"type": "function",
"function": {
"name": "write_file",
"description": "Write a file",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"path",
"content"
]
}
}
}
],
"stream": true
}'"
and the response is :
"{"model":"qwen3-coder:30b","created_at":"2026-07-11T07:53:02.696377Z","message":{"role":"assistant","content":"","tool_calls":[{"id":"call_nmskkkcw","function":{"index":0,"name":"write_file","arguments":{"path":"test.txt","content":"hello"}}}]},"done":false}
{"model":"qwen3-coder:30b","created_at":"2026-07-11T07:53:06.913042Z","message":{"role":"assistant","content":""},"done":true,"done_reason":"stop","total_duration":278598231305,"load_duration":47131536082,"prompt_eval_count":308,"prompt_eval_duration":105327782000,"eval_count":33,"eval_duration":126001577000}"
which means the model supports tools calling. What actually causing the codewhale not creating files?
Appreciate any guidance.
All reactions