OpenAI Codex Prompting Guide for gpt-5.3-codex
Summary¶
OpenAI's official prompting guide for gpt-5.3-codex is the closest analogue OpenAI has to the patterns V025 builds around CLAUDE.md and the skill system. AGENTS.md ≈ CLAUDE.md (merged top-down from home dir + repo path). apply_patch ≈ our Edit/Write tool contract. The guide's "senior engineer" principle is a single sentence doing the work of dozens of "do X / don't do Y" rules — direct corroboration of the Anthropic 7-lessons paper captured the same day.
Key Details¶
- AGENTS.md is OpenAI's CLAUDE.md. Codex-cli auto-discovers AGENTS.md from home dir and the repo path. Later directories override earlier ones; each merged file is injected as a separate user-role message prefixed with directory context.
- Senior-engineer principle (single sentence, replaces a checklist). "Function as a senior engineer—after receiving direction, independently gather context, plan, implement, verify, and refine without awaiting incremental prompts." Default toward implementation with reasonable assumptions over clarification requests.
- apply_patch is the recommended tool. First-class Responses API support or context-free grammar freeform tools; matches the model's training distribution. Direct parallel to our Edit-over-shell rule.
- Compaction unlocks multi-hour reasoning.
/compactreturnsencrypted_contentfor subsequent requests; pass compacted items forward, retaining key state with reduced tokens. Comparable in goal to our SPEC-141 state-drift / context-restoration work. - Phase parameter prevents early stopping.
null/"commentary"/"final_answer"on assistant items; preserving phase metadata during history reconstruction is critical for performance. - Preamble messages — one-sentence acknowledgement + brief planning statement, every 1–3 execution steps, minimum every 6 steps or 10 tool calls. Almost identical to our "narration vs. silence" rule.
- Two personality presets. Friendly (supportive, "we" language, onboarding) vs. Pragmatic (terse, throughput-focused, expert users). Worth comparing to our voice/tone in
/vt-c-visitrans-design-system. - Parallel tool calling.
parallel_tool_calls: truetriggers explicit batch-planning instructions; ordering must group function_calls with corresponding outputs in history. - Response truncation budget. Limit tool outputs to ~10k tokens (~bytes/4); when over, allocate half to start / half to end and truncate the middle with a placeholder.
Why Rolf Thinks This Matters¶
Further Reading¶
- Codex Prompting Guide
- Companion entry: 2026-05-20 Anthropic Agentic Misalignment — the same principle ("teach why, not what") backed by Anthropic's training-data evidence.