codex-subagent
Codex Subagent
[!IMPORTANT] Do not invoke this skill from Codex. It is exclusively for external harnesses (Claude Code, OpenCode) delegating work to Codex CLI.
Delegate the requested work to a non-interactive Codex CLI process and relay its result.
Workflow
-
Confirm the action is within the user's authorized scope. By default the nested agent can write within the selected workspace and use the network, but cannot cross that filesystem boundary. Only the orchestrator may select
danger-full-access, and only when the user has authorized a Git-writing workflow in a trusted repository. -
Build a self-contained prompt preserving all requirements: the concrete objective and deliverables; known repository paths/context; constraints, especially applicable
AGENTS.mdinstructions; required validation or acceptance criteria; and an instruction to inspect the repository, implement completely, run proportionate checks, and summarize changes and checks in the final response. Do not invent product requirements or paste secrets; ask the user only when a missing decision would materially change the result. -
Pipe the prompt on stdin to
scripts/run-codex-subagent.sh. Run it via the harness's managed background-task mode — a foreground call gets cut off at the execution tool's fixed timeout, and&creates an unmanaged process. Do not poll; wait for the harness to report completion, and do not start dependent work until it finishes.printf '%s\n' "$prompt" | /absolute/path/to/codex-subagent/scripts/run-codex-subagent.sh --model gpt-5.6-sol --effort high /path/to/repositoryDefaults: model
gpt-5.6-sol, effortmedium, sandboxworkspace-write. Override independently with--model,--effort(none|minimal|low|medium|high|xhigh|max|ultra; models may support a subset), and--sandbox(workspace-writeordanger-full-access).