Desktop agent is not resumed when a background exec session completes
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Product
Codex desktop agent invoking Codex CLI through a long-running exec/PTY session.
Problem
When an exec command yields a session ID and continues in the background, completion is not delivered back to the parent agent as an event. The parent can discover completion only by explicitly polling the session. If the conversational turn has already ended, the workflow cannot automatically resume and run its next step.
Reproduction
- From a Codex desktop task, start a long-running command such as codex exec.
- Let the command yield a PTY/session ID while it keeps running.
- End or yield the parent turn.
- Allow the child process to finish.
Actual behavior
No completion event wakes or resumes the parent task. The result remains undiscovered until the user sends another message or the agent manually polls the PTY session.
Expected behavior
The parent task should receive a terminal-session completion event containing at least the session ID, exit status, and an output cursor. It should then be able to continue the workflow, similar to completion notifications from managed subagents.
Impact
Long-running CLI orchestration requires busy polling or user reminders. Multi-stage flows such as generate, review, and package cannot reliably proceed unattended.
Environment
- Codex CLI 0.153.4
- macOS
- Codex desktop task using an exec/PTY tool
A completion callback from the app-server or desktop terminal-session layer would address this without requiring output polling.
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 at the app-server or desktop terminal-session layer responsible for exec/PTY sessions, then reproduce the long-running Codex CLI command described in the issue. Done means the parent task receives a completion event with the session ID, exit status, and output cursor, allowing it to resume without polling or another user message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100