agent-cli-delegation-operations
Installation
SKILL.md
Agent Cli Delegation Operations
When to Use
Use when launching or supervising autonomous CLI agents, recovering stalled Codex/Codex runs, handling delegate_task limitations, routing failed Codex lanes to Codex, or maintaining plugin identity scope.
Class-Level Workflow
- Prefer explicit background process tracking and absolute logs over shell-disowned runs.
- Close stdin for Codex modes that wait for EOF; salvage Codex print stalls by checking process state and logs.
- If a Codex background log contains only
Reading additional input from stdin..., treat it as likely waiting for EOF or prompt delivery rather than useful progress. Re-check currentcodex exec --help, relaunch with a known-good stdin-close/input pattern, and verify output artifacts advance.
- If a Codex background log contains only
- Poll by captured session IDs after launch; generic process lists can be empty even while known background sessions are still running. Treat
process listas advisory, not authoritative, when session IDs are available. - For Gemini CLI lanes launched inside a repository, remember Gemini may auto-load
.gemini/agents/*.md. Startup validation errors such as unsupportedpermissionModekeys can prevent useful work even while the wrapper remains alive; capture the error, run from a clean context or fix the agent definitions through a validated repo change. - Treat delegate_task lane limits as an orchestration constraint.
- When a worker patches canonical skills, verify file paths and resulting content before reporting success.
- Keep provider/agent fallback decisions evidence-based.
Consolidated Session Learnings
The references/ directory contains archived narrow skills absorbed during the 2026-04-29 umbrella consolidation pass. Use the subsections below as the class-level index, then open the named reference when a case-specific recipe is needed.