I’m testing “qwen/qwen3-30b-a3b-instruct-2507” model via OpenRouter and I’ve observe that agent is geeting into kind of loop.
Steps to Reproduce
Add openrotuer api key and url
Add custom model “qwen/qwen3-30b-a3b-instruct-2507”
Invoke a prompt like “Implement unit tests for …, next run unit tests and check results, if tests are failing, improve them - continue until tests will pass.”
Agent is trying to implement unit tests and partially he is doing that
After little perio of time he’s trying to do same thing even If I will approve the changes
Expected Behavior
Agent should not enter “loop” and doing same thing multiple times - even if user accept the results.
Hey, thanks for the report. This looks like a potential issue with how the Agent handles custom models via OpenRouter, especially with the Qwen family.
I’ve escalated this to the engineering team. A couple of quick questions for debugging:
Does the looping happen with Cursor’s built-in models (Claude, GPT‑4, etc.), or only with the custom Qwen model?
Have you tried other OpenRouter models to see if they show similar behavior?
There’s a related report about third‑party API models having trouble with tool calling, which suggests broader compatibility issues with non‑native model integrations.