codex-rescue subagent cannot retrieve its own background task result, and status/result are user-invocation-only
What happens
Delegating a review to codex:codex-rescue from an orchestrating agent produces a task id and nothing else. The result is unreachable to that agent: the wrapper cannot fetch it, and /codex:status / /codex:result are marked disable-model-invocation, so only the human can retrieve the output.
Plugin codex@openai-codex 1.0.6 (db52e28f4d9ded852ab3942cea316258ae4ef346), Claude Code, macOS.
Sequence
- The main agent spawns the
codex-rescuesubagent with a review prompt (background). - The subagent returns after ~34s with only:
Codex Task started in the background as task-msgiet54-w97mof. Check /codex:status task-msgiet54-w97mof for progress.— no findings. - The main agent messages the subagent to wait for that task and relay its output. It answers that it is "a thin forwarding wrapper restricted to a single
taskinvocation per rescue request" and is "not permitted to callstatus,result, or poll for background task completion". - The main agent tries the obvious fallback, invoking the
codex:statusskill/command itself, and is refused:Skill codex:status cannot be used with Skill tool due to disable-model-invocation. Ask the user to run /codex:status themselves. - The review output only appears after the human runs
/codex:result <id>and pastes it back.
commands/status.md, commands/result.md, commands/cancel.md, commands/review.md, commands/adversarial-review.md and commands/transfer.md all carry disable-model-invocation, so there is no model-reachable path to a finished task.
Why it matters
An agent that hands work to Codex cannot complete that work on its own — the loop always needs a human relay in the middle. In an unattended or scheduled run there is no relay, so the task completes and its result is simply never read. The delegation looks successful while producing nothing.
Suggestions
Either would close it:
- let the rescue wrapper await or poll the task it started, so it returns findings rather than an id;
- or expose a read-only, model-invocable way to fetch a finished task's result (a separate command without
disable-model-invocation, or a tool), keeping the interactive commands as they are.
Confirming recurrence of this exact failure mode (plugin v1.0.6) on two separate occasions, most recently after this issue was filed — the underlying gap (no model-invocable path to a finished background task) is still open and still bites in practice.
One nuance worth adding to the record: the orchestrating agent's own launch mode does not control this. Setting a background flag to false at the calling layer (i.e., invoking the codex-rescue subagent in a way that should keep it foreground) buys nothing, because agents/codex-rescue.md's own heuristic ("if the task looks complicated, open-ended, multi-step, or likely to keep Codex running for a long time, prefer background execution") decides --background independently, one level down, regardless of how the parent invoked the subagent. A caller has to explicitly demand foreground in the forwarded prompt text to override it — there's no structural way to pin foreground from outside.
Combined with the broker-teardown bug (#540/#612), this compounds badly: a task the heuristic classifies as "complicated" gets backgrounded, the wrapper is then contractually barred from ever calling status/result to check on it, and if a sibling session's SessionEnd kills the broker mid-turn, the failure is invisible for as long as nobody thinks to check manually. In our case that was ~31 minutes.