error: zsh: suspended (tty input) codex --yolo --search resume

Resolved 💬 5 comments Opened Jan 19, 2026 by mattburman Closed Mar 30, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.87.0

What subscription do you have?

plus

Which model were you using?

gpt-5.2 xhigh

What platform is your computer?

Darwin 25.0.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

kitty Version 0.28.1 (0.28.1)

What issue are you seeing?

codex keeps getting killed. i am so confused why.
in the transcript you can see recursive reasoning of the session. when it gets killed i copy and paste the reasoning back into the transcript to see if it can self-resolve.
it's not got there yet...

not sure if it's a zsh issue, kitty issue, codex issue.
but it's sure frustrating.
i likely do not understand the cause of this

What steps can reproduce the bug?

Uploaded thread: 019bd723-9ef7-7ee3-b9af-df792f7d4542

use codex with my setup 😬

i am really not sure what is the exact condition that causes it.

What is the expected behavior?

it doesn't get killed.

Additional information

_No response_

View original on GitHub ↗

5 Comments

mattburman · 7 months ago

ah maybe a fix will land here?: https://github.com/openai/codex/pull/9403

etraut-openai contributor · 7 months ago

Do you have any non-default configuration settings in your config.toml? Perhaps some experimental features enabled?

mattburman · 7 months ago

No experimental features enabled.

Not that much there:

```config.toml
model = "gpt-5.2"
model_reasoning_effort = "xhigh"
notify = ["bash", "-lc", "/usr/bin/afplay /System/Library/Sounds/Bottle.aiff"]

tool_output_token_limit = 25000

<various trust_level for project settings />

[notice]
"hide_gpt-5.1-codex-max_migration_prompt" = true

[notice.model_migrations]
"gpt-5.1-codex-max" = "gpt-5.2-codex"
"gpt-5.2" = "gpt-5.2-codex"

[mcp_servers.code-mode]
command = "/Users/matt/dotfiles/scripts/code-mode-bridge"

[mcp_servers.RepoPrompt]
command = "/Users/matt/RepoPrompt/repoprompt_cli"
args = []
tool_timeout_sec = 10000
enabled = false


latest round of vibed recursive reasoning before I ran out of tokens, may have found a mitigation:

─ Worked for 18m 55s ────────────────────────────────────────────────────────────────────────────────────────────────────────

• Yep — there’s a very consistent pattern now:

  • Every “kill” in the transcripts is actually zsh job-control stopping Codex with SIGTTIN, i.e. zsh: suspended (tty input)

codex --yolo --search resume. That’s not an OOM/segfault; it’s “a process tried to read from the controlling TTY while
not the foreground pgrp”.

  • It always happens while Codex is in a long-running state (“esc to interrupt”), which strongly suggests Codex (or a non-

PTY child it spawns) is touching /dev/tty at the wrong time. That matches https://github.com/openai/codex/pull/9403
exactly: it adds an experimental detach_non_tty feature that does setsid() for non-PTY child spawns so they can’t
inherit /dev/tty (and therefore can’t trigger these SIGTTIN stops).

ASAP mitigation already landed in your dotfiles

  • zsh/path/codex:5 wraps Codex and ignores SIGTTIN (trap '' TTIN) so it shouldn’t get job-stopped anymore.
  • zsh/lib/prompt.zsh:149 + zsh/lib/tty-sanitize.zsh:1 auto-restores stty + clears stuck terminal modes before every prompt,

so even if Codex dies/stops, your shell stops “spewing garbage”.

  • scripts/codex-tty-doctor:1 gives you codex-tty-doctor fix / report for emergency recovery + debugging.

Next thing to do (important): restart your shell + restart Codex so the wrapper actually applies (it won’t affect an
already-running codex --yolo --search resume). Then verify which codex resolves to ~/dotfiles/zsh/path/codex.

Approaching rate limits
Switch to gpt-5.1-codex-mini for lower credit usage?

› 1. Switch to gpt-5.1-codex-mini Optimized for codex. Cheaper, faster, but less capable.

  1. Keep current model
  2. Keep current model (never show again) Hide future rate limit reminders about switching models.

i ran out of tokens, and it's bedtime, so i'll have to see if it continues to occur tomorrow.
etraut-openai contributor · 7 months ago

Thanks for the bug report. We think we understand the problem and are working on a fix.

dhruvil009 · 2 months ago

This is happening repeatedly on all my codex sessions. I resume a session, get one prompt, and if I dare type anything in the input, it crashes, even midstream. This is messed up.