AFter few iterations (4-5) I exceeded the context window size. We need to solve this problem in general but there's one thing that contributes to token usage in particular. On each loop, we add all project files to the context. If we fix this we'll get 2-4x more iterations before exceeding the token limit. In general, we can look at the MessageHistory (or ChatHistory) component in Langchain. It should be a good starting point.
AFter few iterations (4-5) I exceeded the context window size. We need to solve this problem in general but there's one thing that contributes to token usage in particular. On each loop, we add all project files to the context. If we fix this we'll get 2-4x more iterations before exceeding the token limit. In general, we can look at the MessageHistory (or ChatHistory) component in Langchain. It should be a good starting point.