Codex Desktop: interrupted tool task becomes an orphaned “thinking” turn and stop instruction never completes
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- ai-infra-agents, desktop-dev
Research direction
No files, tests, or entry points are named in the report. Start by reproducing the interrupted-task and follow-up stop behavior in Codex Desktop, then trace the active-turn and cancellation flow. Done means interrupted turns settle visibly, stop instructions do not orphan a new turn, and stale or waiting states are distinguishable.
Written by the indexing model from the issue text.
Description
Summary
Codex Desktop can leave a thread in an unusable state after interrupting a long-running task. The original work is interrupted, but a follow-up “stop” instruction creates a new in-progress turn that can remain stuck indefinitely on “Thinking” without producing a reply or running a visible tool call.
This is especially risky when the interrupted task was performing an external write.
Environment
- Product: Codex Desktop
- Platform: macOS (Apple Silicon)
- Observed in a local project thread
What happened
- A task was preparing and uploading a draft to an external API.
- The external system showed that the draft already existed, while Codex still showed the task as running.
- I sent a clear follow-up instruction: stop immediately; do not upload, retry, create, or modify anything further.
- The original turn was marked as interrupted.
- Codex then created a new in-progress turn for the stop instruction itself.
- That new turn remained on “Thinking” and did not return even a simple confirmation that it had stopped.
The thread had already accumulated several interrupted turns and failed image-editing attempts, but the final stop instruction was simple and should not have required expensive context recovery.
Why this is a serious problem
- The UI does not distinguish model reasoning, waiting for an external network request, cancellation propagation, and a stale/orphaned state.
- A user cannot reliably tell whether it is safe to interrupt.
- If an external write request has an unknown outcome, the agent may retry it, creating duplicate external resources.
- “Send and steer” / stop instructions do not reliably take control of a stuck turn.
Expected behavior
- Interrupt should immediately settle the active turn as cancelled in the UI.
- A stop instruction should cancel or supersede the active operation, not become another indefinitely running turn.
- External write operations should be idempotent by default: after an unknown result, query for the expected result before any retry.
- The UI should clearly show whether a turn is:
- reasoning,
- waiting for a tool/network request,
- cancelling,
- interrupted,
- or stale/orphaned.
- Long-running image/tool requests should have clear timeouts and actionable error states.
Reproducibility
I observed this repeatedly in the same Desktop thread:
- precise image-edit requests stalled or failed after a long wait;
- interrupted/resumed turns displayed “Thinking” without progress;
- an external draft-creation task remained active after the external side already contained the expected result;
- a follow-up stop command itself became stuck as a new in-progress turn.
No secrets, account identifiers, or external API credentials are included here.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
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.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·