As you now know, this workflow cannot be automated due to the embedded STOPS:
* Open an image fle
- Tweak background
* Save as .psd
* Save as .jpg
* [repeat until all image files processe]
...but consider this possibility:
Open all (or some) candidate image files via Bridge, File > Open, Drag/Drop into PS Window. Then on each:
* Tweak background
* Minimize window when done
* Go onto the next open file
When all image windows minimized (signfying completion of tweaking), play a new action (e.g., "Save files") that would consist of two Automate > Batch steps:
* Batch step 1: play [new] action "Save as .psd"
Source: open images
- save files in .psd format in a folder of choice
* Batch step 2: play [new] action "Open .psd, flatten and save as .jpg"
Source: folder of just saved .psd files
- flatten each and save in .jpg format in a folder of choice
Kind of a bass ackwards approach, but once setup was complete it would offer a 1-click solution to batch saving the files in the format and folders desired.