You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can confirm. I get an endlessly repeating stream of messages like: he build was successful. I have implemented the logic to show and hide the "No cards yet" message. The build was successful. I have implemented the logic to show and hide the "No cards yet" message. The build was successful.
Been trying this out for a few days. Endless loop happening with local models very often for me. I've been experimenting only with self hosted models (lm studio) and they rarely get past the first task without ending up in a loop. Some examples of models I've tried
qwen/qwen3-30b-a3b
deepseek-coder-33b-instruct-hf-mlx
mistralai/devstral-small-2505
A workaround seems to be adding "just do it, don't ask for permission" in the end of the prompt, in which case it can do more than one thing, since it'll not stop for more input.
Ok, seems I've shot myself in the foot with the output limit. Changed the output tokens from 1000000 to 4096 and I'm not seeing this anymore. Tried both models in above config and they work as expected.
The first PR was pretty much a cosmetic sanity check. I think the larger problem is getting into a situation where summary accompanied with input and cache reads/writes grows larger than 90% of the token limit, eventually causing this infinite loop. This is a real consideration for small local models, but not so much for the $$$ models.
One option is to take control of the summary size. We possibly can use maxTokens parameter of streamText to limit to certain size and then take the last summary size into account (and even when it was last run) when deciding "should I run auto summarize again?". A more robust logic like this might do the trick of getting rid of this problem for real.
Activity
nefthy commentedon Jun 21, 2025
I can confirm. I get an endlessly repeating stream of messages like:
he build was successful. I have implemented the logic to show and hide the "No cards yet" message. The build was successful. I have implemented the logic to show and hide the "No cards yet" message. The build was successful.unkhz commentedon Jun 24, 2025
Been trying this out for a few days. Endless loop happening with local models very often for me. I've been experimenting only with self hosted models (lm studio) and they rarely get past the first task without ending up in a loop. Some examples of models I've tried
A workaround seems to be adding "just do it, don't ask for permission" in the end of the prompt, in which case it can do more than one thing, since it'll not stop for more input.
current config
unkhz commentedon Jun 24, 2025
Ok, seems I've shot myself in the foot with the output limit. Changed the output tokens from 1000000 to 4096 and I'm not seeing this anymore. Tried both models in above config and they work as expected.
However I think there's a condition where this infinite repetition occurs even without absurd output limit. Seems the absurd output limit is the easiest way to reproduce it. I'm thinking it's related to the summarization logic, which recurses back to the chat based on comparing the limits to current token count: https://github.com/sst/opencode/blob/9cfb6ff9646553d6dcbcbe22844ffbeb6480dc12/packages/opencode/src/session/index.ts#L280-L299
Might be something I could attempt creating a fix for.
unkhz commentedon Jun 26, 2025
The first PR was pretty much a cosmetic sanity check. I think the larger problem is getting into a situation where summary accompanied with input and cache reads/writes grows larger than 90% of the token limit, eventually causing this infinite loop. This is a real consideration for small local models, but not so much for the $$$ models.
One option is to take control of the summary size. We possibly can use
maxTokensparameter ofstreamTextto limit to certain size and then take the last summary size into account (and even when it was last run) when deciding "should I run auto summarize again?". A more robust logic like this might do the trick of getting rid of this problem for real.rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Merge pull request anomalyco#262 from shimo4228/feat/skills/search-first
fix: display saved command immediately without app restart (anomalyco#11