Desktop delegation runs the same long-running goal twice in one workspace

Open
#37,687 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
macos, python, rust
Domain
desktop, devtools

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

app bug session
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

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.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.