Revert "Simplify code dealing with creating new sessions."
This reverts commit e1f7107cc0b42113be9b7ea6b4a0f83ce885ba2d.
This broke -e <cmd>. Since this was just to simpify code, reverting for now
BUG: 395555