Shell stops accepting commands after Ctrl+Z suspend/resume over tsh on Slurm Linux host

Resolved 💬 1 comment Opened Jun 23, 2026 by mvillmow Closed Jun 23, 2026

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: ssh into 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

  1. Open iTerm2 on macOS.
  2. Use ssh to connect to a Linux machine on a Slurm cluster.
  3. Start Codex CLI in the remote shell.
  4. Let Codex run work.
  5. Press Ctrl+Z to suspend Codex.
  6. 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗