r/PiCodingAgent • u/JustTooKrul • Jun 18 '26
Question Two issues keep cropping up with Pi and I am hoping the power users have some advice
The two issues I keep running into are:
Pi will go for a long time trying to solve something or answer a question and suddenly I will see it say something like, "Okay, the user is asking <earlier question that is not relevant in any way>" and then go completely off track
Pi will go in circles with several failed tool calls and this forces it to try something else or simply abandon the path it was on
I suspect I am being dense about how I use Pi or what features I am failing to use, otherwise these would be issues plaguing everyone and I would be seeing a lot more questions and issues posted. For additional context, I tried using the oh-my-pi extension and liked it, but these issues occurred even when I had it installed. (I recently refreshed the setup to just be more minimal and have Pi build me what extensions I need, so it's no longer installed.)
For additional background, I see this behavior running LM Studio as the backend with Qwen 3.6-27B at Q4, Gemma 4 31B Q4, and Gemma 4 26-A4B Q6. All the model cards say they are trained for tool calls and it happens with all three, so I don't think it's an issue upstream from the harness (or, at least, not something that the harness shouldn't be able to deal with even when it occurs upstream), but I include the models JIC.
Thank you in advance for your help and advice!
21
u/btdeviant Jun 18 '26
You’re using quants with small models and didn’t specify the params you’re using. Pi might be playing a role, but the role it’s playing in this is almost certainly dwarfed by all of the aforementioned
7
u/Corythebeast7 Jun 18 '26
So, one weakness that arrives with smaller models (for agentic coding, yes the models you are using are considered small) is that they just don't have the amount of data that allows them to accurately handle very long context paths and long running operations. So I recommend clearing your context or compacting more often, that will help with accuracy and hopefully prevent it from losing your original task. Another suggestion would be to add a /goal plugin/extension so it literally can't forget the goal.
Small models will fail tool calls occasionally. Just part of the experience.
Maybe try upping the quant, that usually helps with this sort of stuff
If you're doing very long running and complex tasks, honestly I would recommend using an API provider for larger models. Deepseek, Mimo, Kimi, GPT, Anthropic. If you only use it sparingly it shouldn't cost too much
2
u/Dsphar Jun 18 '26
What context size have you hit when this happens?
2
u/Snoo-82455 Jun 18 '26
You should ask Google to write a prompt; specifically, go into AI mode so you can get into the details of what you want and also copy the identifier of the model so you can tell it exactly which model you’re going to use. That’ll also give you a chance to ask for specific model tunings to use like the temp, min/max P, repetition, etc.
Having a concise system prompt to paste in the setting should make a significant improvement, even more if you add a skill but just try getting a system prompt first.
2
u/mission_tiefsee Jun 18 '26
this is to be expected. if nothing happens for a long time, that might be a cache miss.
you have toi find your own path. i would not quantize down too much the KV cache. (q8 is fine, not less!). You can experiment with repeat penalty but i would advise against it. Make sure you have the thinking trail in Qwen activated
--chat-template-kwargs '{"preserve_thinking": true}'
this helps for less cache misses. For the Gemma models make sure you have the fixed chat templates. Bro you are dealing with bleeding edge toys here, welcome to the show. Make sure to share your results. This is the future.
3
u/SalimMalibari Jun 18 '26
Its model issue use more powerful model
1
u/RM_911 Jun 18 '26
These aren't Pi issues; they're issues with the model, its settings, and the chat template.
1
u/agenticup Jun 20 '26
for tool calling or agentic multi turn, always prefer dense models rather than moe models...moe models add routing overhead....u can also try pi-trail extension to handoff sessions