# Codex native research delegation

This guide is for an explicitly selected persistent collection audit. Before direct MCP calls, select `tool_scope_preset:"deep"` or an appropriate explicit allowlist. The bundled CLI bridge opts its own subprocess into the workflow catalog while preserving explicit allowlists. Ordinary questions and Wiki writes use the main Skill.

Use the native subagent tools visible in the current Codex session. This file explicitly requests delegation for a multi-group research task. It does not define a JavaScript runner or require custom global agents. Inherit the current model, reasoning, permissions and tool access unless the user specifies otherwise.

Resolve the output language from the user's explicit requirement, otherwise their actual task/conversation, with English as the fallback. Preserve it in the research brief and pass it to every reader, verifier and follow-up assignment. Use it for authored answers, report prose, review notes and Wiki titles/sections. Keep original quotations, URLs, IDs, code and technical field names unchanged; put translations outside quotations. This English instruction file does not select the answer language. The bilingual reading reference is in `docs/prompt-reference.en.md` and `docs/prompt-reference.md`.

1. Read `research_status`. Resume an `incomplete` research explicitly with `research_record` kind `resume`; never reopen completed/cancelled research. Read every page of `research_inventory` without narrowing the frozen scope. The optional `python3 hosts/codex/prepare.py --research-id RID` helper calls the same shared MCP tools and emits exhaustive groups; it starts no agents. Keep every `u-` inventory ID and its original bookmark instances. A local package `source_id`, a `u-` inventory ID and an `sN` extracted source ID are different identifiers.
2. Spawn one bounded reader per group within the native concurrency limit. Give each reader the research ID, exact assigned inventory IDs, method, relevant question IDs and a unique operation prefix. Readers call `research_inventory`, `research_fetch`/`research_search`, `research_source`, and `research_record`. Batch up to 16 needed URLs per fetch where applicable, respecting the existing `initial_fetch_plan` and budget; pass `reuse_seconds` (for example 3600) so a URL an earlier reader already saved returns its existing text instead of being fetched again. Require full relevant saved text, an explicit `source_review`, source-backed claims with exact quotes and a separate `inventory_review` for every assigned URL. Submit ready records through `research_record.entries` in batches of up to 50 with stable `batch_id` values under the reader's unique prefix. Place reviews before their claims; use returned claim IDs in subsequent inventory/answer batches. An invalid entry rejects the whole batch; identical retries reuse the batch ID. Return structured IDs, citations, judgments and failures. Failed fetches cannot become reviewed entries. Do not ask a child to create another scheduler.
3. Wait for every reader through the native wait/agent controls. A pending thread or unread message is not completion. Preserve failed assignments and already-persisted progress. Then use separate, fresh verifier subagents for the same complete ID groups. Verifiers independently read claims and saved evidence, challenge unsupported conclusions and misleading freshness/completeness claims, and use retraction/gap/conflict/resolution records where justified. They must identify uncheckable items; a successful child turn is not proof of successful verification.
4. Read `research_coverage` with `all`, `missing`, `unread` and `unreviewed`, following `next_offset` separately for every filter. Compare the complete inventory with every returned assignment, not just the first page or a count. Send the full difference plus failed verification IDs to another bounded reading and independent verification pass when needed. Use the host's current controls for child continuation or cancellation; no plugin lease or worker process exists.
5. Save complete returned JSON with `research_record` kind `external_run`: include all inventory IDs, reader/verifier results, remaining IDs, actual observed states, and coverage metrics. Read the saved location from `recorded.result_path` and its digest from `recorded.result_sha256`. Use actual native run IDs when available. If only a caller correlation key is available, prefix it with `local:` and say it is not a native host run ID. Record only completed observations as completed; an unknown outcome is not cancellation.
6. Synthesize answers with valid claim IDs and run coverage again. `research_finish` owns the completion gate. Unverified major conclusions, unexplained errors or remaining coverage gaps require an `incomplete` report. The parent must directly read `research_status` and every relevant `research_coverage` page after child reports settle, compare returned paths with actual `artifacts` and `external_runs`, and read the complete analysis artifact with its verified SHA-256. A child's success or claimed path is not confirmation. Link the verified report, full saved result and coverage, and retain excluded/blocked sources and their original bookmark context. Do not retry an unknown paid outcome automatically.

If native subagent tools are disabled or unavailable, report the missing capability. The host may perform a bounded single-agent task under the same research rules; do not claim native delegation occurred. Native subagent threads and plugin research archives have separate lifecycles.
