OpenAI Codex Agents
Use this skill when the job is best served by OpenAI-native agent building rather than a generic framework wrapper.
Workflow
- Start with the Responses API unless you need the Codex product surface or the Agents SDK orchestration layer.
- Use Codex app, web, IDE, GitHub, or cloud tasks when the work is repository-scoped, diff-reviewable, and benefits from isolated worktrees or background execution.
- Pick the model deliberately from the current model catalog; document whether the task needs a Codex-class coding model, a frontier reasoning model, a deep-research model, or a computer-use model.
- Choose the tool surface explicitly: hosted web/file/code tools, hosted MCP, tool search, shell, apply_patch, computer use, or local runtime tools.
- Use the Agents SDK when you need handoffs, guardrails, sessions, tracing, hosted containers, skills, shell/apply_patch control, or multi-agent composition.
- Use MCP/connectors only with explicit approval policy, domain trust, OAuth/resource-discovery review, and auditability in mind.
- Validate the workflow on a real repo or real task with a small eval set before wider rollout.
Guardrails
- Default to approval for sensitive MCP or connector actions.
- Record the exact model, reasoning setting, and tool policy used in tests.
- Keep coding agents on a bounded write scope and enforce diff review before merge.
- Prefer official OpenAI SDKs and docs over third-party wrappers when behavior matters.
- Test for out-of-scope file edits, hidden network access, and unrelated config rewrites before granting broader autonomy.
Output Requirements
- State the chosen model and why.
- State whether the workflow uses Codex, Responses only, Agents SDK, or a specialized research/computer-use surface.
- State the tool/approval policy and one rollback trigger.


