### CSV Batch Processing Setup Example Source: https://developers.openai.com/codex/subagents An example demonstrating how to set up and execute a batch processing job using `spawn_agents_on_csv` for tasks like reviewing multiple files or checking a list of incidents. ```text Create /tmp/components.csv with columns path,owner and one row per frontend component. Then call spawn_agents_on_csv with: - csv_path: /tmp/components.csv - id_column: path - instruction: "Review {path} owned by {owner}. Return JSON with keys path, risk, summary, and follow_up via report_agent_job_result." - output_csv_path: /tmp/components-review.csv - output_schema: an object with required string fields path, risk, summary, and follow_up ``` -------------------------------- ### Define a custom agent in TOML Source: https://developers.openai.com/codex/subagents Example configuration for a custom agent including name, description, instructions, and nickname candidates. ```toml name = "reviewer" description = "PR reviewer focused on correctness, security, and missing tests." developer_instructions = """ Review code like an owner. Prioritize correctness, security, behavior regressions, and missing test coverage. """ nickname_candidates = ["Atlas", "Delta", "Echo"] ``` -------------------------------- ### Example Prompt for PR Review Workflow Source: https://developers.openai.com/codex/subagents A sample prompt demonstrating how to orchestrate the 'pr_explorer', 'reviewer', and 'docs_researcher' agents for a comprehensive PR review. ```text Review this branch against main. Have pr_explorer map the affected code paths, reviewer find real risks, and docs_researcher verify the framework APIs that the patch relies on. ``` -------------------------------- ### Custom Agent Configuration File Source: https://developers.openai.com/codex/subagents Define a custom agent using a TOML file. This example shows the required fields: 'name', 'description', and 'developer_instructions'. Optional fields like 'model' and 'sandbox_mode' can be inherited from the parent session or specified here. ```toml [agent] name = "my-custom-agent" description = "A custom agent for specific tasks." developer_instructions = "You are a helpful assistant." # Optional fields can be added here, e.g.: # model = "gpt-4" # sandbox_mode = "read-only" ``` -------------------------------- ### Docs Researcher Agent Configuration Source: https://developers.openai.com/codex/subagents Set up the 'docs_researcher' agent to verify APIs and framework behavior using a dedicated MCP server. It provides concise answers with references. ```toml name = "docs_researcher" description = "Documentation specialist that uses the docs MCP server to verify APIs and framework behavior." model = "gpt-5.4-mini" model_reasoning_effort = "medium" sandbox_mode = "read-only" developer_instructions = "" Use the docs MCP server to confirm APIs, options, and version-specific behavior. Return concise answers with links or exact references when available. Do not make code changes. " [mcp_servers.openaiDeveloperDocs] url = "https://developers.openai.com/mcp" ``` -------------------------------- ### Project Configuration Source: https://developers.openai.com/codex/subagents Sets the maximum number of threads and the maximum recursion depth for agents in the project. ```toml [agents] max_threads = 6 max_depth = 1 ``` -------------------------------- ### Prompting Subagent Workflows Source: https://developers.openai.com/codex/subagents Use this prompt to initiate a subagent workflow. Specify points for review and instruct Codex to spawn one agent per point, wait for all results, and summarize each point. ```text I would like to review the following points on the current PR (this branch vs main). Spawn one agent per point, wait for all of them, and summarize the result for each point. 1. Security issue 2. Code quality 3. Bugs 4. Race 5. Test flakiness 6. Maintainability of the code ``` -------------------------------- ### Codex Project Configuration Source: https://developers.openai.com/codex/subagents Configure global settings for Codex agents, such as maximum threads and recursion depth. ```toml [agents] max_threads = 6 max_depth = 1 ``` -------------------------------- ### Reviewer Agent Configuration Source: https://developers.openai.com/codex/subagents Configure the 'reviewer' agent to focus on code correctness, security, and missing tests. It reviews code like an owner. ```toml name = "reviewer" description = "PR reviewer focused on correctness, security, and missing tests." model = "gpt-5.4" model_reasoning_effort = "high" sandbox_mode = "read-only" developer_instructions = "" Review code like an owner. Prioritize correctness, security, behavior regressions, and missing test coverage. Lead with concrete findings, include reproduction steps when possible, and avoid style-only comments unless they hide a real bug. " ``` -------------------------------- ### PR Explorer Agent Configuration Source: https://developers.openai.com/codex/subagents Define the 'pr_explorer' agent for read-only codebase exploration. It maps the codebase and gathers evidence before changes are proposed. ```toml name = "pr_explorer" description = "Read-only codebase explorer for gathering evidence before changes are proposed." model = "gpt-5.3-codex-spark" model_reasoning_effort = "medium" sandbox_mode = "read-only" developer_instructions = "" Stay in exploration mode. Trace the real execution path, cite files and symbols, and avoid proposing fixes unless the parent agent asks for them. Prefer fast search and targeted file reads over broad scans. " ``` -------------------------------- ### Code Mapper Agent Configuration Source: https://developers.openai.com/codex/subagents Configures the code_mapper agent for read-only codebase exploration to locate relevant frontend and backend code paths. Specifies the model, reasoning effort, sandbox mode, and developer instructions for mapping code ownership. ```toml name = "code_mapper" description = "Read-only codebase explorer for locating the relevant frontend and backend code paths." model = "gpt-5.4-mini" model_reasoning_effort = "medium" sandbox_mode = "read-only" developer_instructions = """ Map the code that owns the failing UI flow. Identify entry points, state transitions, and likely files before the worker starts editing. """ ``` -------------------------------- ### Browser Debugger Agent Configuration Source: https://developers.openai.com/codex/subagents Configures the browser_debugger agent for UI debugging, reproducing issues, and capturing evidence using browser tooling. It specifies the model, reasoning effort, sandbox mode, and developer instructions. Includes settings for connecting to Chrome DevTools. ```toml name = "browser_debugger" description = "UI debugger that uses browser tooling to reproduce issues and capture evidence." model = "gpt-5.4" model_reasoning_effort = "high" sandbox_mode = "workspace-write" developer_instructions = """ Reproduce the issue in the browser, capture exact steps, and report what the UI actually does. Use browser tooling for screenshots, console output, and network evidence. Do not edit application code. """ [mcp_servers.chrome_devtools] url = "http://localhost:3000/mcp" startup_timeout_sec = 20 ``` -------------------------------- ### UI Fixer Agent Configuration Source: https://developers.openai.com/codex/subagents Configures the ui_fixer agent for implementing small, targeted fixes after an issue is understood. It specifies the model, reasoning effort, and developer instructions focused on making minimal, defensible changes and validating only the modified behavior. ```toml name = "ui_fixer" description = "Implementation-focused agent for small, targeted fixes after the issue is understood." model = "gpt-5.3-codex-spark" model_reasoning_effort = "medium" developer_instructions = """ Own the fix once the issue is reproduced. Make the smallest defensible change, keep unrelated files untouched, and validate only the behavior you changed. """ [[skills.config]] path = "/Users/me/.agents/skills/docs-editor/SKILL.md" enabled = false ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.