Roo-Code: Reading large files causes the AI to lose all instructions

Which version of the app are you using?

v3.8.4

Which API Provider are you using?

VS Code LM API

Which Model are you using?

Claude 3.5 Sonnet

What happened?

If the model reads a file which is too large, that data will mess up the instrucitons and previous context causing it to lose track of what is was doing completely. This can happen if the source code files are too large, but more comonly if the AI triesd to debug using API calls and gets a very long json response for example. When the large data is fed to the model it forgets its instructions and starts to respond like a chat bot, with no idea of what it was doing previously. I assume this is caused by the new data overwriting the previous data in the context, so the solution would be to limit how much of the context is allowed to be used for the latest data.

Steps to reproduce

  1. Use the AI for coding a simple app
  2. Ask it a question involving reading in a large dataset, like a large json response from a rest api, or any large text document
  3. It will completely lose track of the conversation and its instructions and act like a chat bot.

Relevant API REQUEST output


Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 16

Commits related to this issue

Most upvoted comments

@FarbrorMartin we’re working on supporting partial file reads with a reasonable default for maximum lines read.