# \[resource\_exhausted\] Error during long, non-interactive agent runs using \`glm-5.2-max\` and \`kimi-k2.7-code\`

**URL:** <https://forum.cursor.com/t/resource-exhausted-error-during-long-non-interactive-agent-runs-using-glm-5-2-max-and-kimi-k2-7-code/165010>\
**Category:** Bug Reports\
**Tags:** cli, long-running-agents\
**Created:** [July 7, 2026, 9:01am UTC](https://forum.cursor.com/t/resource-exhausted-error-during-long-non-interactive-agent-runs-using-glm-5-2-max-and-kimi-k2-7-code/165010 "2026-07-07T09:01:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![enjunchen](https://avatars.discourse-cdn.com/v4/letter/e/f6c823/32.png) [@enjunchen](https://forum.cursor.com/u/enjunchen)\
**Post date:** [July 7, 2026, 9:01am UTC](https://forum.cursor.com/t/resource-exhausted-error-during-long-non-interactive-agent-runs-using-glm-5-2-max-and-kimi-k2-7-code/165010/1 "2026-07-07T09:01:58Z")

</div>

### Where does the bug appear (feature/product)?

Cursor CLI

### Describe the Bug

Cursor CLI frequently fails with `RetriableError: [resource_exhausted] Error` during long, non-interactive agent runs using `glm-5.2-max` and `kimi-k2.7-code`.

These runs are configured with unlimited execution time, but Cursor still aborts the agent or subagent turn after reconnect/retry events.

In several benchmark cases, this caused the agent to exit without a valid final result, or with an empty/partial diff, producing invalid low scores.

### Steps to Reproduce

Run the Cursor CLI agent on a long coding/debugging task in a large C++/CUDA-style repository, such as FlashTensor, using either of the following models:

- `glm-5.2-max`
- `kimi-k2.7-code`

The issue reproduced in Docker-isolated Cursor CLI benchmark runs with unlimited timeout enabled.

The transcript consistently ends with:

```json
{"type":"turn_ended","status":"error","error":"[resource_exhausted] Error"}

### Expected Behavior
- Continue after transient reconnects
- Retry cleanly

### Operating System
Linux

### Version Information
CLI Version: 2026.07.01-41b2de7

### For AI issues: which model did you use?
glm-5.2-max
kimi-k2.7-code

### For AI issues: add Request ID with privacy disabled
c0288605-7415-4298-bf2e-20736f00aac9
0a4d79a6-51f4-47d6-b101-8ba7394103fa
182077fa-57c9-4b9b-a756-31e19aa4709b
4df66492-3fd2-40d2-9b39-8492c42b8ccd
c77b8b0e-787c-498d-aebf-ddd2e08915c1
46453843-86c5-4421-928b-ce2ca3c8382d
d40c05c3-f319-4783-8765-e9ef1ab6b088
dfd65ae0-04fa-4531-849d-1b853a9064ee
7f3319cb-be89-4888-b1bf-8b001511cc51
2e14b3c5-bb96-4fb3-aca0-9ba47d6bc842
484d90eb-139e-4fe3-8a36-e41c16b0a1e2
f89ad0a2-9083-49e6-9e08-40ff86fdb180
86cad661-e577-49b6-a9c2-241435c472b1
9e2bc60a-8f79-4678-bca6-4bd8fe1fda4a
19b89c97-2cbb-488b-98e3-1b78d1ccb05b
2d5a90ef-9c0e-4a4f-bb4c-fb8719cecb47
c7659fbe-c3ec-439f-bdce-8c21a74c434c
72d65bb7-33db-4bf7-8f6f-49037d3d9029
7f46dfd8-44a8-4b3f-b735-69c22f606e74

### Does this stop you from using Cursor
Yes - Cursor is unusable
```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [July 7, 2026, 12:33pm UTC](https://forum.cursor.com/t/resource-exhausted-error-during-long-non-interactive-agent-runs-using-glm-5-2-max-and-kimi-k2-7-code/165010/5 "2026-07-07T12:33:02Z")

</div>

Hi @enjunchen!

Thanks for raising this. I can see an elevated rate of 429s on GLM 5.2 / Kimi K2.7, and I’ve flagged this for the team.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [August 13, 2026, 1:39pm UTC](https://forum.cursor.com/t/resource-exhausted-error-during-long-non-interactive-agent-runs-using-glm-5-2-max-and-kimi-k2-7-code/165010/9 "2026-08-13T13:39:49Z")

</div>

Closed on August 13, 2026, 1:39pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
