Can I monitor Cursor’s button states such as ‘Accept All’, ‘Reject All’, or ‘Generating status’ programmatically?
I have a JSON file containing hundreds of prompts that I want to feed to Cursor one by one. After each prompt, I need to automatically verify certain pages via code to ensure the format is correct; if it is, I want Cursor to run Accept All. I believe I’ll need to use commands like:
simpler approach is to create a todo list from your prompts and save it into a file and refer to it in a chat, and ask for completing the task one by one and mark each one DONE when finished.
It might make sense, but sometimes even if I send the exact same prompt, it produces outputs in different formats, so I have to check each one before accepting it.
For example, if I ask it to generate JSON and tell it that the JSON should have three fields metadata, content, and explanation with specific formatting rules, it sometimes doesn’t follow that format.
My goal is to assign the task and then just come back in the evening to see its status; if I don’t check with code each step, errors will compound and become unmanageable, and fixing them afterward would do more harm than good.
You don’t need such low-level access and it will probably end up causing an account ban for suspicious activity, until they don’t offer an API its better to not automate in unorthodox ways, your task can be achieved by ‘mcp evals’ which are mcps dedicated to evaluate a result, so you could add to context the json file, tell the model to read and process one prompt at a time and add an eval mcp that essentially contains examples of good results or instruct to run a verification script as @cocode suggested, the only limit is 25 tool calls that will be soon modifiable to a custom number we choose.
Thank you for your answers, but I don’t think these will be useful for me at the moment.It seems like the 25 tool call limit won’t allow me to do that.
I also have an extra question regarding the ‘ban’ risk is this an official statement from the Cursor team, or is it just your personal opinion?
Depending on the situation, I might write a Python script that visually identifies the buttons and clicks them automatically.Like it would be safer.
We don’t currently offer a way to automate the accept / reject actions in Cursor for any use case.
While we cannot condone or promote automating inputs into Cursor, using Python to click the button automatically seems like a reasonable thing to hook up.