Ask Codex
Use a full Codex session through ACP. This is not a subagent and must not be
implemented with the current harness's in-chat delegation tools.
Invoke this skill only when the current user explicitly asks to run
$ask-codex or explicitly says to ask Codex. Never auto-select it for review,
planning, a second opinion, delegation, or implementation. Mentioning,
discussing, or linking this skill is not authorization to run it.
Workflow
Resolve <skill-dir> to this skill's directory.
Give Codex a self-contained brief: objective, checkout, relevant files,
constraints, expected output, whether writes are authorized, and the
requirement to archive its own external task before finishing.
For advice, review, or planning, run the read-only wrapper:
<skill-dir>/scripts/ask-codex read "<self-contained prompt>"
Use write mode only when the user authorized implementation and the brief
names the owned scope:
<skill-dir>/scripts/ask-codex write "<self-contained prompt>"
Record the created Codex task or session ID, treat the result as another
full session's work, inspect its evidence, and validate any edits in the
originating session before reporting completion.
A one-shot session is temporary. Require the spawned Codex session to
archive itself with set_thread_archived before it finishes. After its
result has been captured, verify that it is archived. If self-cleanup did
not happen, archive the exact task in guaranteed caller cleanup on success,
failure, cancellation, timeout, or early stop. Use set_thread_archived
when the Codex app tool is available; otherwise run codex archive <id>.
If archival fails, report the exact ID instead of silently leaving the task
behind.
The wrapper uses the current Codex configuration; do not hard-code a model.
Use a fresh one-shot ACP session by default. Continue a persistent named session
only when the user explicitly asks for an ongoing cross-harness conversation.
Keep that session while the conversation is active, then archive it when the
user ends the conversation.
If ACP or Codex authentication fails, report the exact failure. Do not silently
replace the requested Codex session with a subagent or self-answer.
1---2name: ask-codex3description: Ask Codex from a non-Codex harness through a full ACP session for an independent answer or explicitly scoped implementation.4---56# Ask Codex78Use a full Codex session through ACP. This is not a subagent and must not be9implemented with the current harness's in-chat delegation tools.1011Invoke this skill only when the current user explicitly asks to run12`$ask-codex` or explicitly says to ask Codex. Never auto-select it for review,13planning, a second opinion, delegation, or implementation. Mentioning,14discussing, or linking this skill is not authorization to run it.1516## Workflow17181. Resolve `<skill-dir>` to this skill's directory.192. Give Codex a self-contained brief: objective, checkout, relevant files,20 constraints, expected output, whether writes are authorized, and the21 requirement to archive its own external task before finishing.223. For advice, review, or planning, run the read-only wrapper:2324 ```sh25 <skill-dir>/scripts/ask-codex read "<self-contained prompt>"26 ```27284. Use write mode only when the user authorized implementation and the brief29 names the owned scope:3031 ```sh32 <skill-dir>/scripts/ask-codex write "<self-contained prompt>"33 ```34355. Record the created Codex task or session ID, treat the result as another36 full session's work, inspect its evidence, and validate any edits in the37 originating session before reporting completion.386. A one-shot session is temporary. Require the spawned Codex session to39 archive itself with `set_thread_archived` before it finishes. After its40 result has been captured, verify that it is archived. If self-cleanup did41 not happen, archive the exact task in guaranteed caller cleanup on success,42 failure, cancellation, timeout, or early stop. Use `set_thread_archived`43 when the Codex app tool is available; otherwise run `codex archive <id>`.44 If archival fails, report the exact ID instead of silently leaving the task45 behind.4647The wrapper uses the current Codex configuration; do not hard-code a model.48Use a fresh one-shot ACP session by default. Continue a persistent named session49only when the user explicitly asks for an ongoing cross-harness conversation.50Keep that session while the conversation is active, then archive it when the51user ends the conversation.5253If ACP or Codex authentication fails, report the exact failure. Do not silently54replace the requested Codex session with a subagent or self-answer.