openai / openai/codex-plugin-cc
Proposal: detach long-running codex-rescue dispatches via external bg-tmux helper (Bash tool 10-min ceiling workaround)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 33.3k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Refs: iyo-oyi-128/claude-config#153 (元 Spec) / iyo-oyi-128/claude-config#165 (bg-tmux skill source) / iyo-oyi-128/dotcodex#10 (根本問題 tracker)
Background
Claude Code Bash tool has a 10-minute hard ceiling. codex:codex-rescue dispatches of long-running Codex CLI tasks (e.g. 15-20 min implementation jobs with tests) silently die at exactly 10 minutes (iyo-oyi-128/dotcodex#10). Env extension via BASH_MAX_TIMEOUT_MS (anthropics/claude-code#5615) is unofficial — the official spec is 600,000ms hard, community reports are split (passing / not passing).
A community de-facto pattern is to detach long-running subprocesses into a separate tmux session via setsid + isolated socket, structurally bypassing the Bash tool ceiling and harness background task tracker (anthropics/claude-code#25188 / #45717). Reference implementations include mitsuhiko/agent-stuff skills/tmux/ and primeline.cc orchestration pattern.
Proposal
Add a wrapper in codex:codex-rescue / codex:codex-cli-runtime that detects long-running dispatches and detaches them via an external tmux helper instead of foreground Bash.
The external tmux helper is provided as a generic skill in iyo-oyi-128/claude-config (bg-tmux, merged in claude-config#165). It exposes 6 entry scripts (spawn / status / wait / capture / kill / sweep) + a shared lib, designed to be invoked from any caller (not codex-specific). The bg-tmux design avoids known pitfalls:
setsidfor new PGID (anthropics/claude-code#45717 SIGTERM propagation)- isolated socket for harness tracker bypass (anthropics/claude-code#25188)
- sentinel file + capture-pane two-stage completion detection (primeline.cc)
- tmux-not-installed fallback via setsid+nohup
- orphan sweep with self-exclusion + idempotency
Acceptance criteria
codex:codex-rescuelong-running dispatches (15-20 min+) complete via tmux path without dying at the 10-min Bash ceiling- Short-running (< 10 min) dispatches continue via foreground Bash (no regression)
- tmux-not-installed fallback path exists (delegated to bg-tmux's setsid+nohup or equivalent)
- Orphan tmux session cleanup path exists (delegated to bg-tmux-sweep or equivalent)
粗い PR 分割案
1 PR (codex-cli-runtime / codex-rescue wrapper wiring)
References
- iyo-oyi-128/claude-config#165 (bg-tmux skill source、dispatch target reference)
- anthropics/claude-code#25188 (harness background task tracker SIGTERM)
- anthropics/claude-code#45717 (Bash tool SIGTERM parent propagation)
- anthropics/claude-code#25315 (tmux send-keys race condition)
- anthropics/claude-code#25881 (10-min ceiling override request, closed as not planned)
- mitsuhiko/agent-stuff
skills/tmux/SKILL.md(Claude Code skill format tmux reference) - https://primeline.cc/blog/tmux-orchestration (sentinel + capture two-stage pattern)
- https://thoughtbot.com/blog/tmux-only-for-long-running-processes (two-tier mental model)
Contributor guide
No contributing guide indexed for this repository
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 by locating the codex:codex-rescue and codex:codex-cli-runtime wrapper entry points, then review the referenced bg-tmux skill's six entry scripts and shared lib. Define how dispatch duration selects foreground Bash versus the external helper, including fallback and cleanup. Done means the four acceptance criteria pass for long and short dispatches, missing tmux, and orphan sessions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, javascript
- Domain
- cli, devtools, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100