codex-subagent-recovery

Detect broken Codex ACP subagents and trigger a safe respawn workflow.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/spiral-app-labs/skills --skill codex-subagent-recovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-subagent-recovery
Source: https://github.com/spiral-app-labs/skills/tree/main/codex-subagent-recovery
Command: npx skills add https://github.com/spiral-app-labs/skills --skill codex-subagent-recovery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Recover failed or silently broken Codex ACP subagents with a strict respawn-first protocol. Use when Donna or another OpenClaw agent sees a Codex subagent fail, return empty output, hit gateway closed 1012, process_exit, label already in use, or any other ACP run that did not clearly finish with evidence. Also use when spawning Codex through ACP and you need the exact safe harness parameters so you do not accidentally spawn an OpenClaw Sonnet session by using main, leo, or a UUID.

Core Features & Use Cases

  • Detect broken Codex runs quickly and classify failure modes.
  • Respawn Codex with a fresh Codex ACP harness (agentId: codex, runtime: acp, mode: run) and log outcomes.
  • Enforce safety constraints to avoid OpenClaw identities and ensure artifact verification.

Quick Start

Spawn Codex ACP with the exact harness parameters to recover a broken Codex run and validate artifacts.

Frequently Asked Questions about codex-subagent-recovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recover a Codex ACP subagent that failed with empty output or gateway errors?

To recover a failed Codex ACP subagent, you trigger a safe respawn workflow that detects broken runs, classifies failure modes like gateway closed 1012 or process_exit, and respawns with exact ACP harness parameters before verifying artifacts.

What ACP spawn parameters are required to safely respawn a Codex subagent?

The exact ACP spawn parameters required to safely respawn Codex are agentId set to codex, runtime set to acp, and mode set to run. These constraints prevent accidentally spawning an OpenClaw Sonnet session by using main, leo, or a UUID.

Why does my Codex subagent respawn as an OpenClaw Sonnet session instead of Codex?

Your Codex subagent respawns incorrectly when using main, leo, or a UUID instead of the exact ACP harness parameters. Enforcing agentId codex, runtime acp, and mode run ensures the respawn targets the correct Codex identity and avoids OpenClaw conflicts.

When should I use a subagent recovery workflow for Codex ACP runs?

You should use subagent recovery when Donna or another OpenClaw agent sees a Codex subagent fail, return empty output, hit gateway closed 1012, process_exit, label already in use, or any ACP run that did not clearly finish with evidence.

Can I use this recovery process for OpenClaw workflows other than Donna?

Yes, the recovery process applies to Donna or other OpenClaw workflows encountering Codex ACP subagent failures. It detects broken runs, enforces strict spawn harness parameters, applies rigorous logging, and performs artifact verification before finalizing recovery.

Does subagent recovery verify artifacts before completing the Codex respawn?

Yes, subagent recovery enforces artifact verification before finalizing the recovery workflow. It applies rigorous logging and validates outcomes after respawning Codex with the fresh ACP harness to ensure the recovered run produced clear evidence.