This closes #7456. It hides the terminal when the job is dead and displays an error when trying to open an exec session for a task that isn’t running. There’s a skipped test for the latter behaviour that I’ll have to come back for.