When requesting the LLM to explain the ISP transition from IPv4 to IPv6 and to provide a binary comparison, Cursor’s Agent Looping detection mechanism produced a false positive. While the model was outputting the binary representation of an IPv6 address (which inherently contains long runs of 0 bits — a normal characteristic of IPv6 addresses), it was incorrectly flagged as “stuck in a repeating response pattern” and forcibly terminated, preventing the answer from completing.
Steps to Reproduce
Start a new conversation in Cursor with a prompt similar to:
“Explain the ISP transition from IPv4 to IPv6, and using 2001:db8::1 as an example, provide its full 128-bit binary representation alongside a binary comparison with an IPv4 address.”
The model begins outputting the binary expansion of the IPv6 address (where :: corresponds to 80 or more consecutive 0 bits).
The output is forcibly interrupted mid-stream with an “Agent Looping Detected” error.
Expected Behavior
The model should be allowed to complete the IPv6 binary comparison output normally. Consecutive 0 bits are legitimate content of an IPv6 address and should not be classified as a model loop. The loop detector should distinguish between “semantically justified repetition” and “genuine degenerate looping.”
Context: Agent-mode conversation requesting a technical explanation with binary comparison output
Additional Information
Request ID: c1d43c4d-5402-4ad4-8e06-b4aca084214f
{“error”:“ERROR_INTERNAL”,“details”:{“title”:“Agent Looping Detected”,“detail”:“The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:}}
The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.
Agent Looping Detected The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.
NonRetriableError: Agent Looping Detected The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.
at D9_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8654:112147)
at gsa (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8654:110730)
at Z9_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:12878)
at Object.classify (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:17452)
at G9_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:5856)
at async Isa.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:16804)
at async ege.resume (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:14591:19874)
at async Jgl.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:18950:15595)
at async Jgl.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:18950:32201)
at async B7e._submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8762:2569)
Hey, thanks for the detailed report and for the Request ID with the stack trace, that really helps. I can see from your screenshot that the binary IPv6 output (NAT64/RFC 6052) gets cut off in a long run of zero bits.
What you’re describing looks like a false positive. The repetition detector treated a valid pattern (long sequences of 0 in a 128-bit IPv6 value) as a degenerate loop. That shouldn’t happen, and it’s not related to your settings.
For now, here are a couple of workarounds to get the full output:
Ask the model to print the binary output inside a fenced code block (```), or to split it into groups or octets with separators, for example 8 bits separated by spaces. This reduces the chance that a long run of identical bits gets flagged as repetition.
Try the same request on a different model. The detector is client-side, but different models format output differently.
One quick question: is glm-latest connected via your own API key as a custom model, or is it the default option from the list? That’ll help narrow this down. If I get an update on the issue, I’ll post it here.
glm-latest connects via my own api, which is provided by bytedance’s cloud service. glm-latest corresponds to glm-5.2. I switched to the doubao-seed-evolving model, the problem persisted. as the snapshot and error log show:
Request ID: 6b424602-b50f-433c-a3a6-549333e90fcc
{“error”:“ERROR_INTERNAL”,“details”:{“title”:“Agent Looping Detected”,“detail”:“The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:}}
The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.
Agent Looping Detected The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.
NonRetriableError: Agent Looping Detected The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.
at D9_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8654:112147)
at gsa (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8654:110730)
at Z9_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:12878)
at Object.classify (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:17452)
at G9_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:5856)
at async Isa.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:16804)
at async ege.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:14591:15413)
at async Jgl.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:18950:15595)
at async Jgl.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:18950:32201)
at async B7e._submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8762:2569)
I started a new session, input the prompt, use bytedance’s platform with minimax-m3 model :
Explain the ISP transition from IPv4 to IPv6, and using 2001:db8::1 as an example, provide its full 128-bit binary representation alongside a binary comparison with an IPv4 address. ouput contents should not use code blocks.
then reproduced the same action. And yes, your workaround is useful. When I explicitly require model use code block in explaining IP addresses, the continuous ZEROs have not triggered the exception.
Request ID: b690a59e-624b-4fe3-b462-2e3131881c7a
{“error”:“ERROR_INTERNAL”,“details”:{“title”:“Agent Looping Detected”,“detail”:“The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:}}
The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.
Agent Looping Detected The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.
NonRetriableError: Agent Looping Detected The model got stuck in a repeating response pattern, so this turn was stopped. Please try again with a different model or start a new conversation. If the problem persists, please contact support.
at D9_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8654:112147)
at gsa (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8654:110730)
at Z9_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:12878)
at Object.classify (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:17452)
at G9_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:5856)
at async Isa.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8655:16804)
at async ege.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:14591:15413)
at async Jgl.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:18950:15595)
at async Jgl.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:18950:32201)
at async B7e._submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.glass.main.js:8762:2569)