I frequently open config files from the command line using
subl ~/folder/file
When running the above and the folder does not exist sublime will pop up with a security prompt when trying to save this new file:
“Sublime Text wants to make changes.”
“Enter your password to allow this”
I don’t think this has been an issue previously - I think it just created the folder when saving (but I might be wrong).
For me creating the folder is fine or as plan B - warn the user that the folder does not exist.
Using Sublime Text, stable channel Build 4189 on Mac Sonoma (M1) and the user has permissions to write the files in these locations.