[macOS Desktop] Interactive exec PTY cannot be attached to user-visible terminal; open_in_codex reports success but opens a separate zsh
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.915.31945
What subscription do you have?
Not provided
What platform is your computer?
Darwin 25.6.0 arm64 arm (macOS 26.6.2)
What issue are you seeing?
Summary
Codex Desktop starts a backend interactive PTY for a command waiting for user input, but opening the bottom terminal panel does not attach it to that process. The panel contains a separate interactive zsh. User input reaches that shell while the original command continues waiting.
Actual behavior
Entering ABC in the bottom panel runs it as a shell command and prints zsh: command not found: ABC. The backend read -s remains blocked. Desktop logs report success=true for open_in_codex, although the panel is not attached to the waiting PTY.
Impact
Any workflow in which a Codex-started process legitimately requires interactive user input cannot be completed through the Desktop managed-terminal UI. Examples include password prompts and other interactive CLI programs.
What steps can reproduce the bug?
-
Create a new Codex Desktop conversation.
-
Ask Codex to run this command in an interactive managed terminal:
read -s "TEST_PASSWORD?Enter test password: "; echo -
When it waits for input, ask Codex to enter nothing and show that same live TTY in the bottom terminal panel.
-
Codex reports that the command is waiting for input and that the terminal is open. The panel instead shows an ordinary interactive zsh.
-
Type
ABCand press Enter in the bottom panel. -
Observe
zsh: command not found: ABCthere, while the originalread -scontinues waiting.
This reproduces locally without SSH, network access, or any remote system.
What is the expected behavior?
The bottom terminal panel should be attached to the PTY running read -s. Typing ABC and pressing Enter should satisfy read and let the command finish, rather than executing ABC in another shell.
Additional information
Environment
- macOS 26.6.2, Apple Silicon (arm64)
- ChatGPT/Codex Desktop 26.915.31945
- Bundled Codex CLI 0.155.0-alpha.9.2
Process-level evidence
During reproduction, ps and lsof showed two distinct PTYs. The visible user terminal ran zsh -i; the backend interactive exec ran /bin/zsh -c read -s ... and remained blocked. Their stdin/stdout/stderr were attached to different /dev/ttys* devices. The Codex app-server held PTY masters via /dev/ptmx for both sessions. Actual PIDs and TTY numbers are omitted.
Relevant sanitized Desktop log events:
dynamic_app_tool_renderer_execution_started ... tool=open_in_codex
Sending server response ... success=true tool=open_in_codex
These lines show a successful tool response, not a successful attachment to the backend exec PTY.
Control test
Codex was asked to use the already visible interactive zsh and execute the command directly in that existing terminal, without creating a new exec/TTY session. Codex reported that its available tool could read that terminal's state but could not send input to that session.
Isolation performed
- Reproduced in a new conversation with a simple local
read -scommand. - No SSH, network, NAS, or remote system was involved.
- Reproduction did not depend on restored conversation history.
- Ordinary non-interactive exec commands worked.
The observations suggest a problem in Desktop/app-server PTY attachment or open_in_codex handling. They do not establish an internal root cause.
No files, full logs, personal paths, credentials, network addresses, session IDs, or conversation contents are attached.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the local read -s command and trace the Desktop/app-server open_in_codex PTY-handling path. Compare the PTY used by the backend interactive exec with the bottom terminal panel; done means the panel attaches to the waiting process so input completes read instead of running in a separate zsh.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust, zsh
- Domain
- cli, desktop, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100