Shell stops accepting commands after Ctrl+Z suspend/resume over tsh on Slurm Linux host
Summary
When Codex is running in a shell reached through tsh on a Slurm Linux cluster, suspending Codex with Ctrl+Z and then resuming it leaves the terminal/session in a bad state. After Codex comes back up, the shell no longer works properly and commands cannot be submitted.
Environment
- Client terminal: iTerm2 on macOS
- Remote access:
sshinto Linux machines on a Slurm cluster - Remote shell:
bash - Codex CLI:
codex-cli 0.142.0 - Remote host observed while filing:
Linux fs-mbz-cpu-002 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Steps to reproduce
- Open iTerm2 on macOS.
- Use
sshto connect to a Linux machine on a Slurm cluster. - Start Codex CLI in the remote shell.
- Let Codex run work.
- Press
Ctrl+Zto suspend Codex. - Resume Codex, for example with
fg.
Expected behavior
After resuming, Codex should restore terminal state and job-control handling so shell input continues to work and commands can be submitted normally.
Actual behavior
After Codex comes back up, the shell/terminal input is broken. Commands cannot be submitted properly, leaving the session effectively unusable.
Notes
This looks like a terminal state or job-control restoration issue around SIGTSTP/SIGCONT, possibly exposed by the ssh remote TTY path.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗