At the moment if there are conflicts during an update/sync, the user is prompted to go and fix the conflicts and then either continue to the next branch or abort the action. This doesn't work when the shell is non-interactive.
I think it would probably be better to not prompt for continue/abort but try and detect when the merge/rebase has either been completed for that branch or aborted and to continue on to the next branch or exit.