Why do subagents get stuck in summary loops?

I started running into this issue today, has never been an issue in the past
has cursor started treating all Agents.md as always apply recently?
my repo has 3-4 rules at <100 lines, no skills, but have been using AGENTS.md as directory level instruction.
This has worked fine for months, but today subagents are failing, stuck in a summary loop and my main agents also got stuck in a summary loop after small tool calls which has absolutely chewed through tokens

I got opus to read through the logs and it also blamed the AGENT.md, but as I said either this was never an issue or a lot of tokens have been burned because of this

  • Request / Trace ID: `6e487943-8bc3-4651-aa9b-ac53df8ab03a`

- Request / Trace ID: `a71243c5-8129-469c-9424-64ac9c6d35f1`

Hey @siritch_369!

AGENTS.md has always been treated as an always-apply rule.

It ooks like you have a parent agent with 1M context and a Grok 4.5 subagent that has a smaller context. Maybe you were working with subagents with a bigger context before?

The summarization threshold is a percentage of the model’s window, not a fixed size, so a smaller-window subagent hits it far sooner, and parts of the context can’t be compacted at all. That can leave it summarizing after every small tool call without making progress, which matches what you’re seeing.

Worth trying: pin your subagents to the same model as the main agent, or run the task with subagents off. If the loop stops, that’s the cause.

Also, a good time to check whether your AGENTS.md is too big. It’s included on every request and it’s one of the parts that can’t be compacted away.

I just hit a very similar issue. My Agent got stuck in an endless exploration/search loop and had already burned through over 100 million tokens before I manually stopped it.

This makes me wonder — if I hadn’t stopped it in time, would it have just kept going until it consumed all of my remaining tokens / on-demand budget?

In my case, support refused to give any usage credit for the tokens wasted by the loop, saying on-demand charges are non-refundable even when caused by a bug. That feels pretty harsh when the Agent itself is the one stuck in a loop.

Has anyone else experienced this kind of runaway token consumption, and did you manage to get any credit back?

@Colin

Request ID: a926bebc-5ae1-4102-88ed-331971a407c2