openai / openai/codex

Codex CLI 0.154.0 hangs when launched inside tmux.

Open
#44,767 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI TUI
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

codex-cli 0.154.0

What subscription do you have?

Organizational

Which model were you using?

No response

What platform is your computer?

Linux 4.18.0-553.158.1.el8_10.x86_64 x86_64 x86_64

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

tmux

Codex doctor report

What issue are you seeing?

Summary

Codex CLI 0.154.0 hangs when launched inside tmux.

Environment

  • Codex CLI: 0.154.0
  • tmux: 3.4
  • OS: Rocky Linux 8
  • Shell: bash

Steps to reproduce

  1. Open a tmux pane.
  2. Run:
    codex
    
    

Actual behavior

Codex never reaches the interactive UI. Its startup blocks on:

tmux display-message -p #{extended-keys-format}

The tmux child remains in a poll/wait state.

Expected behavior

Codex should start normally inside tmux, as it did before the Codex update.

Workaround

This starts Codex successfully:

env -u TMUX -u TMUX_PANE codex

This suggests the tmux capability-detection step is hanging.

What steps can reproduce the bug?

Open a tmux pane.
Run:
codex

What is the expected behavior?

Codex should start normally inside tmux, as it did before the Codex update.

Additional information

Workaround
This starts Codex successfully:

env -u TMUX -u TMUX_PANE codex

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the hang by running codex in a tmux 3.4 pane on Rocky Linux 8, then compare it with env -u TMUX -u TMUX_PANE codex. Start at the startup tmux capability-detection step that runs tmux display-message -p #{extended-keys-format}; done means Codex reaches its interactive UI inside tmux without the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.