DesktopCommanderMCP icon indicating copy to clipboard operation
DesktopCommanderMCP copied to clipboard

Constant Claude hit the max length for message...

Open dts350z opened this issue 1 year ago • 9 comments

Is this normal:

Image

dts350z avatar Apr 19 '25 19:04 dts350z

Looks like I can make progress by insisting on block edits. But large file reads and writes are still problematic. FYI I once tried to get wndsurf to break my c++ code into smaller files and it completely broke everything and I had to restore from a backup.

dts350z avatar Apr 19 '25 20:04 dts350z

This is Claude throttling your requests. How big is your file? If you trying to read huge file, file content can consume all your tokens and Claude block your request.

serg33v avatar Apr 19 '25 20:04 serg33v

That particular file is 1323 lines. I have the Claude Pro plan (and windsurf and a claude api key...).

dts350z avatar Apr 19 '25 21:04 dts350z

It goes away before I can capture it but now I'm also getting a red "network connection interrupted" or similar message in the upper right hand corner of Claude desktop, which resets the chat, sending me into a loop where the current operation never completes.

One place this is happening is when monitoring a long c++ build (15 projects/dependencies). I've switched to my doing the builds vs. Claude, but I still hit this error situation when fixing build errors.

Have you tested your server with large files and long builds (with lots of output)?

dts350z avatar Apr 20 '25 17:04 dts350z

Finally got a screen shot (windows this time):

Image

dts350z avatar Apr 21 '25 02:04 dts350z

From chat screenshot it seems its working but somethimg about file is too big.

Can you, out of curriosity, paste your file into https://platform.openai.com/tokenizer To see how many tokens it has?

I also see that you got issues with edit block. I plan to improve it this week.

wonderwhy-er avatar Apr 21 '25 05:04 wonderwhy-er

FYI: https://medium.com/realworld-ai-use-cases/cursor-tip-at-scale-it-is-expensive-heres-how-you-save-money-04b1aacc4aff

Tips to cut down on tokens etc. except in this case we already in Claude desktop so can't move prompts to it.

The one cpp file that was causing problems is Tokens 14,266 Characters 58493

dts350z avatar Apr 21 '25 15:04 dts350z

I've noticed a similar issue, the workaround I found was to insist on block-edits which has the added benefit of preventing file update failures and faster response times

chtnnh avatar May 05 '25 16:05 chtnnh

The context window provided by Claude Pro is quite small and it's very easy to overflow either individual message requests or the entire conversation. If I have a long file, the first thing I get Claude to do is to break that file up into lots of little components and then import them. I also start new chats at the earliest opportunity to minimize token usage. As far as I understand it, every time you send a new message, the entire conversation so far is replayed to the AI taking up all of those tokens all over again.

fezzzza avatar May 06 '25 18:05 fezzzza