Ctrl-Z suspend during active work can leave shell unusable after resume over tsh/Slurm
Open 💬 2 comments Opened Jun 23, 2026 by mvillmow
Summary
When Codex is doing work and I press Ctrl+Z to suspend it, then resume it, the shell can be left in a broken state where I cannot submit any commands.
Environment
- Local terminal: iTerm2 on macOS
- Remote access: tsh into a Linux Slurm cluster
- Workload context: Codex running active work on cluster/login nodes
Reproduction
- Open iTerm2 on macOS.
- Connect to a Linux Slurm cluster using tsh.
- Start Codex and let it begin active work.
- Press Ctrl+Z to suspend Codex.
- Bring Codex back with fg.
- Try to enter and submit shell commands.
Expected behavior
After resume, Codex and/or the shell should restore terminal state cleanly. The shell should accept and submit commands normally.
Actual behavior
After Codex comes back up, the shell does not work properly and commands cannot be submitted.
Notes
This looks like it may involve terminal mode or job-control state not being restored correctly after SIGTSTP/SIGCONT, especially through iTerm2 plus tsh on remote Linux machines.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗