This issue has been persistent for the past two days. It seems like the input token count is exceeding the limit, but I’m unsure how to resolve or debug this effectively.
Any guidance on why this might be happening or how to fix it would be greatly appreciated!
I wanted to inform you that I have deleted all the chat history from the capra-context-state.json file, which has successfully reduced the token count by approximately 40,000. However, the overall token count still exceeds 1 million. After completing this, I also reset and refreshed the project.
Given this, I wanted to inquire if I should also remove the chat history from the capra-thread.json file. I have observed that the current chat history seems to be connected to this file. However, I am unsure about which specific parts of the file I should remove.
Could you please provide some guidance on this? If possible, it would be greatly helpful if you could share image references or specific instructions regarding the files or sections that can be safely deleted.
Thank you in advance for your support and assistance.
I have followed your instructions and also I have removed the chat history from capra-context-state.json and capra-thread.json but still showing the same issue, and the token not reduced yet. I have reset my workspace now the conversations history has removed by the error still occurs.
@Saif, thank you for your report.
In the procedure, I instruct to send a new prompt instead of [Try Again].
When I verified it just now, I also got the same error message when I clicked [Try Again].
However, when I sent a new prompt, it worked successfully.
Could you please confirm that you are sending a new prompt instead of [Try Again]?
(Based on your report, I have updated my post to provide a clearer explanation of the procedure and the differences in behavior depending on how the prompt is sent.)
Thank you for your response and for updating your post to clarify the procedure.
I wanted to let you know that I followed the steps as instructed:
Deleted the chat history from the capra-context-state.json and capra-thread.json files.
Reset and refreshed the project.
Sent a new prompt to the App Prototyper agent instead of using the [Try Again] button.
However, I am still encountering the same error. As you can see from the attached screenshot, the token count remains above 1 million (currently at 1,064,385). While the steps you provided did help reduce the token count slightly, it hasn’t resolved the issue entirely.
Could you please advise on any additional steps I should take to address this?
@Saif, thank you very much for your detailed report.
After checking, I was able to reproduce the issue you are experiencing and identify the cause and solution.
I have added the cause and additional steps to my article, but I will also quote the added sections here.
How to reduce past conversation history contained in input tokens > Procedure > Step 7
Causion
Please do not delete the entire JSON or any items other than app-prototyping-agent: edit-app-agent: [<here>] from capra-context-state.json.
If you do this, the App Prototyping Agent may mistakenly recognize existing workspace as new workspace and attempt to recreate App Blueprint.
Hi, what worked for me was I basically downloaded the whole app, created a new app with prototyper then uploaded and overwrote all the files. Not as elegant a fix as this but has worked for me.
I went to code view, firebase studio icon on the left bar, chose shortcuts, firebase studio commands, zip & download. This downloaded all my app.
I then went to firebase studio and asked for a basic new app, I then uploaded
all the downloaded files (extracted) and overwrote the ones in there, then committed the changes, then went to prototype view.
there was one error to fix but it fixed it, then everything was working in a new
Workspace. So don’t have the token error anymore and have a duplicate can use prototyper with.