fix session.shell_upgrade after #3401
Update session.shell_upgrade to match #3401, lands #4058