openai / openai/codex-plugin-cc

task --background: detached worker has no timeout or stall watchdog

Open
#520 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
33.3k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

codex-companion.mjs task --background spawns a detached worker (spawnDetachedTaskWorker, stdio: "ignore", unref()) whose run path (runTrackedJobexecuteTaskRunrunAppServerTurnawait state.completion) has no wall-clock timeout, stall detection, or watchdog of any kind. The only timers in the runtime are the 250 ms completion-inference debounce, the transfer-import timeout, and the status --wait polling cap — none bound the job itself.

Observed in practice: a background review job hit an API/network stall and sat 52 minutes with zero log progress, never self-terminating; it had to be found and cancelled manually. A detached background job that can outlive any reasonable turn deserves either a configurable per-task timeout or a no-progress watchdog (kill + surface after N minutes without app-server events), so callers don't have to babysit job logs.

Version: plugin as shipped with codex-cli 0.144.4.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start in codex-companion.mjs at spawnDetachedTaskWorker and trace the runTrackedJob → executeTaskRun → runAppServerTurn path, including the existing timers. Run task --background while observing its logs, then verify that a stalled or overlong job is bounded and its termination is surfaced to callers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.