write tool sometimes has a "request was aborted" result #193

Closed
opened 2026-02-16 17:25:42 -05:00 by yindo · 14 comments
Owner

Originally created by @adamdotdevin on GitHub (Jun 20, 2025).

Originally assigned to: @thdxr on GitHub.

i think this is when maxTokens is exceeded, should return a better error for this case

Originally created by @adamdotdevin on GitHub (Jun 20, 2025). Originally assigned to: @thdxr on GitHub. i think this is when maxTokens is exceeded, should return a better error for this case
yindo closed this issue 2026-02-16 17:25:42 -05:00
Author
Owner

@jackberger03 commented on GitHub (Jun 20, 2025):

having this issue a lot as well using claude 4 opus on the max plan, usually on the second or third file write

@jackberger03 commented on GitHub (Jun 20, 2025): having this issue a lot as well using claude 4 opus on the max plan, usually on the second or third file write
Author
Owner

@oscabriel commented on GitHub (Jun 20, 2025):

I'm encountering this pretty often using the context7 mcp when trying to write detailed plan files. Claude Code doesn't have any issue with it. Can you set maxTokens in the config? Better error messaging here would be great to at least know what's causing the request to be aborted.

@oscabriel commented on GitHub (Jun 20, 2025): I'm encountering this pretty often using the context7 mcp when trying to write detailed plan files. Claude Code doesn't have any issue with it. Can you set maxTokens in the config? Better error messaging here would be great to at least know what's causing the request to be aborted.
Author
Owner

@cloudbridgeuy commented on GitHub (Jun 23, 2025):

I'm also seeing this fairly often. I have to ask it to continue or resume to get it back to work. If there's a way to obtain debugging information about the issue, I would gladly append it here.

For reference, I was using Sonnet 4 and had a context window of 60% the last time this happened.

I run /compact after a second time hitting that message, dropping the context to 10%, but couldn't make it work.

@cloudbridgeuy commented on GitHub (Jun 23, 2025): I'm also seeing this fairly often. I have to ask it to `continue` or `resume` to get it back to work. If there's a way to obtain debugging information about the issue, I would gladly append it here. For reference, I was using `Sonnet 4` and had a context window of `60%` the last time this happened. I run `/compact` after a second time hitting that message, dropping the context to `10%`, but couldn't make it work.
Author
Owner

@jeremytregunna commented on GitHub (Jun 25, 2025):

Even after trying all these things, I can reliably make this happen analyzing the code of opencode from the repo with the prompt talking about reverse engineering it. start with a high level overview of the different components, then after that's done and written to a file, use the same sort of prompt framework reminding it's doing a reverse engineer task, it's working on a specific section from the high level doc, and to be as detailed as possible, talking about integration points, including internal/external, provide a deep understanding of what the code is doing and how it fits into the greater system.

That approach will get you the high level, and maybe 1 or 2 subsystem detailed responses, then it reliably starts to fail. Restart it, you get 1 more, and then it reliably fails, ad infinitum.

Tried a bunch of things to give a way to test this reliably, and this is the best I've found, using claude 4 sonnet at least.

@jeremytregunna commented on GitHub (Jun 25, 2025): Even after trying all these things, I can reliably make this happen analyzing the code of opencode from the repo with the prompt talking about reverse engineering it. start with a high level overview of the different components, then after that's done and written to a file, use the same sort of prompt framework reminding it's doing a reverse engineer task, it's working on a specific section from the high level doc, and to be as detailed as possible, talking about integration points, including internal/external, provide a deep understanding of what the code is doing and how it fits into the greater system. That approach will get you the high level, and maybe 1 or 2 subsystem detailed responses, then it reliably starts to fail. Restart it, you get 1 more, and then it reliably fails, ad infinitum. Tried a bunch of things to give a way to test this reliably, and this is the best I've found, using claude 4 sonnet at least.
Author
Owner

@thdxr commented on GitHub (Jun 26, 2025):

can you try to reproduce this one more time with latest?

@thdxr commented on GitHub (Jun 26, 2025): can you try to reproduce this one more time with latest?
Author
Owner

@jedisct1 commented on GitHub (Jun 26, 2025):

Still happens for me with the latest.

Using Claude models.

@jedisct1 commented on GitHub (Jun 26, 2025): Still happens for me with the latest. Using Claude models.
Author
Owner

@albisserAdrian commented on GitHub (Jun 26, 2025):

Started happening to me today using Claude Pro or API key after updating from v0.1.120 to the latest version, I just get request was aborted after Preparing edit.... No issues when using claude-code with a Pro account.

@albisserAdrian commented on GitHub (Jun 26, 2025): Started happening to me today using Claude Pro or API key after updating from v0.1.120 to the latest version, I just get `request was aborted` after `Preparing edit...`. No issues when using claude-code with a Pro account.
Author
Owner

@oscabriel commented on GitHub (Jun 26, 2025):

Yep, the problem had stopped for me and just came back when I updated to latest (v0.1.146). Asked it to read some docs, check some files in my codebase, and make a plan, and got the request was aborted during the actual writing the plan step of the todo list it created.

@oscabriel commented on GitHub (Jun 26, 2025): Yep, the problem had stopped for me and just came back when I updated to latest (v0.1.146). Asked it to read some docs, check some files in my codebase, and make a plan, and got the `request was aborted` during the actual writing the plan step of the todo list it created.
Author
Owner

@jeremytregunna commented on GitHub (Jun 26, 2025):

can you try to reproduce this one more time with latest?

@thdxr Still able to reproduce it using my directions above.

@jeremytregunna commented on GitHub (Jun 26, 2025): > can you try to reproduce this one more time with latest? @thdxr Still able to reproduce it using my directions above.
Author
Owner

@adamdotdevin commented on GitHub (Jun 27, 2025):

i've asked dax to hop on this one, it's driving me crazy

@adamdotdevin commented on GitHub (Jun 27, 2025): i've asked dax to hop on this one, it's driving me crazy
Author
Owner

@albisserAdrian commented on GitHub (Jun 27, 2025):

@adamdotdevin after updating from v0.1.146 to v0.1.150 the issue was resolved for me both on mac and WSL.

@albisserAdrian commented on GitHub (Jun 27, 2025): @adamdotdevin after updating from v0.1.146 to v0.1.150 the issue was resolved for me both on mac and WSL.
Author
Owner

@cloudbridgeuy commented on GitHub (Jun 27, 2025):

I'll update and give it a try to see if I can resolve the issue, then report back.

Edit:

I worked on a feature using version 0.1.145 until I hit the request was aborted error. I then upgraded to version 0.1.152 and, after telling the agent to continue where it left off, it didn't fail.

@cloudbridgeuy commented on GitHub (Jun 27, 2025): I'll update and give it a try to see if I can resolve the issue, then report back. _Edit:_ I worked on a feature using version `0.1.145` until I hit the `request was aborted` error. I then upgraded to version `0.1.152` and, after telling the agent to continue where it left off, it didn't fail.
Author
Owner

@mabadir commented on GitHub (Jun 30, 2025):

I stopped seeing this error, just reporting. But I also did not have a way to reproduce it.

@mabadir commented on GitHub (Jun 30, 2025): I stopped seeing this error, just reporting. But I also did not have a way to reproduce it.
Author
Owner

@adamdotdevin commented on GitHub (Jul 4, 2025):

going to close this as resolved, lots of fixes since this was opened.

@adamdotdevin commented on GitHub (Jul 4, 2025): going to close this as resolved, lots of fixes since this was opened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#193