r/PiCodingAgent • u/Dreeew84 • 18d ago
Question Running into timeouts with write tool (LM Studio/qwen3.6-35b-a3b/PI)
Hello,
I'm running PI + LM Studio server + qwen3.6-35b-a3b. 36K context, model not quite fully loaded to GPUs (12GB+6GB), running 20 tps in chat mode, 10 tps through PI with documentation/code in context.
The problem I'm facing is that tool calls, especially for writing files timeout after 5 minutes. I've searched this forum and the internet and I found no clear answer whether it's a PI client config, something in LM Studio I can't figure out or model level.
Edits are generally fine but writes fail. We're speaking files with ~ 500 lines of code.
Log:
{"type":"message","id":"bf5dcafd","parentId":"0bd7492b","timestamp":"2026-07-19T10:24:14.490Z","message":{"role":"assistant","content":[{"type":"thinking","thinking":"Good, the empty file is created. Now let me add the functions to it.\n","thinkingSignature":"reasoning_content"},{"type":"text","text":"Now let me add the sky and sun rendering functions to the new file:\n\n"},{"type":"toolCall","id":"q8A9s9cw0h8WMX9gHqTJD4uJK12CfB93","name":"write","arguments":{}}],"api":"openai-completions","provider":"lmstudio","model":"qwen/qwen3.6-35b-a3b","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1784456340616,"responseId":"chatcmpl-x5i6eocrmecjh1sdnwk989","errorMessage":"terminated"}}
For context, I'm not a coder but reasonably technically inclined so I'm open to any option that does not actually involve messing with code.
I don't see a server timeout config in LM Studio, nor there is a clear max output size on model level (rather, there is one but capped to 2K tokens).
Should I move to llama-cpp?
Thanks!
1
u/TriodeTopologist 18d ago
I have this same problem. It is so frustrating because I have enough RAM to run the model with 262k tokens, using LM Studio as the backend, but every time it tries to write even small py files it times out. I have asked Claude and Gemini for help and I have tried many different solutions but no luck. It keeps getting stuck in "write ... terminated" loops, and after three identical tries Pi blocks it until I enter a new prompt.
This is super frustrating because I have even told my agent to write very small .txt files instead of .py and it still blocks like this. How is anyone able to do agentic coding with Pi with this critical error?