codexwright

Capability Recipes

Use this catalog when deciding what a requirement should become. The target is always a Codex SDK workflow; this is not a provider-neutral runtime menu.

Rule of thumb: use ordinary code when one deterministic function will do, a tool when the Agent must call it, a Skill when the procedure is reusable, and an Agent only when open-ended judgment or orchestration is required.

Need Best fit Rule Example
Deterministic transform Ordinary code Pure parsing, formatting, math or validation belongs in a tested function, not an Agent Normalize a ticket’s priority labels with a lookup table
External API Tool Wrap network calls in one bounded tool with timeout, schema and error mapping; keep the Agent away from raw credentials A lookup_order tool calling an internal REST endpoint
Retrieval / RAG Tool + ordinary code Chunk and index deterministically; expose one search tool with citations, and let the Agent decide when to search Search a docs index and return passages with source IDs
Memory Ordinary code + state Persist short-term state in the workflow store; durable user memory is a separate reviewed feature, not hidden prompt stuffing Keep a per-session transcript keyed by run ID
Approval gate Host The host owns permission; the workflow requests a decision and stops. Never let a model confirm its own write Require human approval before sending an external email
Scheduling Host / ordinary code Use the host’s scheduler or an external cron. Do not add a resident loop to fake scheduling Run a daily digest from CI or the host, not a while True
Per-user credentials Host Credentials stay in the host or provider; pass only opaque handles or scoped tokens to tools Let Codex hold the login; the tool receives a short-lived token
Guardrails Tool + ordinary code Enforce hard limits with deterministic checks at the trust boundary; prompts are not a security control Reject requests over a token or spend budget before the model call
Human review of output Host approval Route the exact artifact to a person, record the decision, and bind approval to that revision Review a generated contract before it leaves the workflow
Evaluation Generated eval runner Use deterministic case assertions and mas eval; add a custom metric through extensions when needed Assert priority == P0 for an urgent ticket case
Trace and cost Generated observability Export OTLP on demand and report tokens with not_a_bill: true; never present usage as a bill Export one run to a collector and report unmeasured turns
Migration Agent + tools (rebuild) Capture behavior from the old runtime, then rebuild on Codex SDK with preservation criteria; no runtime abstraction Port a LangGraph pipeline to Codex SDK and keep its acceptance cases

Boundaries

See Product positioning for the full boundary between builder, host and generated workflow.