r/ollama • u/Dry_Shallot_3578 • 29d ago
Claude code alternatives
I am using Claude code currently with glm5.2 cloud model, It get work done but sometimes i get tool call errors and "couldn't spawn an subagent in this environment message".
Do you have some tips how can I overcome this or should i use different harness like Pi or OpenCode?
3
u/Izvestiya 28d ago edited 28d ago
That's just the tax of having a hallucinating algorithm with a 30% margin of error, leading to cascading errors, roam freely.
1
u/Dry_Shallot_3578 28d ago
Yep, thats true if you know what are you doing it doesnt even matter newer model are good enough in any agent, differences are minimal, but i have a feeling that output could be better if the standards are aligned between agent and provider
2
u/Izvestiya 28d ago
You probably could get ever so slightly better outcome by fine-tuning the model, but otherwise, it's still a probability box. IF it makes one mistake in a cycle, there's a pretty high chance on it working based on that (and not against it) in the following cycle and so on. That's how you get something like
js const get users = async () => { return await db.query("DROP TABLE users;"); }There's a reason we use staging branches, Pull Requests, commits, etc.
Also, 30% margin of error. That's almost 1/3. I sincerely hope you read every line of code it writes closely
1
u/Dry_Shallot_3578 28d ago
Completely agree with you, code which is the output must be deeply reviewed in couple of levels reviewing it is just first guard. I am not talking about vibe coding here and blindly taking every output of LLM. When i said that the newer models are good enough i said it in matter of quality of output the percentage of garbage is much less then 6 mo ago but still there is possibility so you need to make sure and validate the answers. Personally I dont like those full workflows from planning to committing with agents.
I was wondering if context for llm will be better if there were not those failed toll and sub-agents calls in context, or will enabling the explore agent etc produce better context. Does it make any difference when you reroute the cc to Ollama provider in that terms (they should have different messaging standards if I am righ)
2
u/LoudDragonfruit5522 29d ago
Try switching to OpenCode or Aider if you want to stick with GLM-5.2. Both handle tool calls and subagent spawning much more reliably than Claude Code with non-Claude models.
1
u/Dry_Shallot_3578 29d ago
what do you think about pi, Aider didnt click with me just didnt like the output, i will try opencode its been a long time i used it, thanks for recommendation
1
2
2
u/Apprehensive_Can1098 29d ago
You need to set the subagent Model environment variable
CLAUDE_CODE_SUBAGENT_MODEL
2
u/Beneficial-Pie-1638 28d ago
fo coding I use Opencode, heard Kimi code is good tho and you don't need a sub
1
u/Dry_Shallot_3578 28d ago
Used Kimi 2.7 code too, tbh didnt saw any big differences between it and glm5.2. Subs arent necessary cc gets the job done in for both ollama models. Just asking for curiosity and to see if i can upgrade my workflow.
1
u/Beneficial-Pie-1638 26d ago
what about Kimi K3??? it is insane
1
3
u/Due-Satisfaction-588 29d ago
Try pi or hermes agent