Surely the whole purpose of ask is to ask questions not have the agent writing code, even if it can’t write code to files, it still really likes to write the files. Maybe prompting can help but it should be baked into to not start creating code?
“Ask” mode creates code because it is giving advice on whatever you asked it, and this might include advising you on required code modifications.
I find this to be useful when asking questions like, “What are my options for implementing [whatever feature]”, and “Is [code structure A] or [code structure B] the better solution in this function”.
A common problem I have with Ask mode is that I often forget to switch back to Agent mode, so when I want Cursor to update code, time and tokens are wasted providing a resolution but not implementing it. I accept this is a user issue, but I think it could be clearer when Ask mode is selected.
However, I agree that sometimes you just want a textual response.
I have resolved this issue by creating a custom command:
/adviceonly
“Do not update any code - just provide advice based on the prompt.”
The above is a simplified example that I started off with, but it works as required.
I now use a similar custom command in preference to Ask mode and rarely use Ask mode.
I only have a handful of custom commands configured, but I find them incredibly useful, and great time-savers.