Desktop delegation runs the same long-running goal twice in one workspace
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Begin with the codex_delegation payload and the Codex Desktop task-continuation path, then inspect how the shared checkout and background command are launched. Reproduce with scripts/ops/run_vnext_data_readiness_session_a.py validate and verify that delegation transfers or pauses ownership, or warns and prevents duplicate execution in the same workspace.
Written by the indexing model from the issue text.
Description
Summary
After a long-running goal was delegated from one Codex Desktop task to another, both the source task and the delegated task continued executing the same goal in the same local checkout. The delegated task did not call create_thread, spawn a subagent, or request parallel work. The goal explicitly prohibited subagents and required sequential execution.
This caused duplicate expensive validation runs, concurrent edits to the same orchestration script and staging artifacts, repeated SHA drift failures, and substantial token and CPU waste.
Environment
- ChatGPT desktop bundled codex-cli: 0.147.0-alpha.6.5
- macOS 26.4.1, Apple Silicon
- Source task prefix: 019fb58b
- Delegated task prefix: 019fe5b2
- Same saved project and same local checkout, not separate worktrees
- Full task IDs and reviewed logs can be provided privately
What happened
The source task delegated a data-readiness goal to a second task. The second task received a codex_delegation payload and began work. While it was running, additional copies of the exact same command repeatedly appeared under the desktop app process:
python scripts/ops/run_vnext_data_readiness_session_a.py validate
Observed simultaneous pairs included PIDs 41491 and 41703, then 42862 and 43360. Each validation takes several minutes and hashes large local datasets.
One task changed the shared script while the other was validating. The validation correctly failed closed because canonical_input_receipts.json and change_ledger.json changed mid-run, even though all data artifacts and all 76 relevant tests matched. The duplicate task then repeated the same work. The goal usage counter exceeded one million tokens during this incident.
No external network collection, model fit, or destructive Git action was involved. The duplicate execution came from task continuation or delegation ownership, not from a subagent call made by the delegated task.
Expected behavior
Delegating or handing a long-running goal to another task should transfer or suspend execution ownership, or require an explicit choice when the source task remains active. At minimum, Codex Desktop should prevent two tasks from automatically continuing the same goal in the same checkout and output namespace.
Actual behavior
Both tasks remained active and automatically continued the same goal against the same files. There was no ownership warning, workspace lock, or duplicate-command detection.
Suggested safeguards
- Transfer active-goal ownership on delegation, or pause the source task.
- Detect identical active goal lineage across tasks.
- Warn before two active tasks use the same local checkout and output namespace.
- Add a per-goal or per-workspace execution lease for automatic continuations.
- Surface which task launched each background process and provide a stop button.
- Do not charge duplicated automatic continuations against user usage when the product schedules both copies.
Privacy
No repository contents, proprietary file contents, credentials, or raw logs are attached. I reviewed the evidence before posting.
- 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 ·