Codex Integration for Claude Code — Prompts
Prompt 1: SKILL.md — stdin Blocking Warning (verbatim)
Source: plugins/skill-codex/skills/codex/SKILL.md
**IMPORTANT (stdin)**: `codex exec` always reads stdin and concatenates it with the positional prompt -- even when the prompt is fully supplied as a positional argument. If stdin is not closed, codex blocks forever. When invoking from a harness (background tasks, hooks, scripts where stdin is not a TTY but also not closed), explicitly redirect stdin: append `</dev/null` to the command, e.g. `codex exec ... "prompt" </dev/null 2>/dev/null`. Symptom of getting this wrong: zero bytes of stdout, zero CPU accumulated, process appears hung indefinitely.
Prompting technique: Failure-mode documentation with diagnostic signature. The skill documents the exact observable symptom of the bug ("zero bytes of stdout, zero CPU accumulated, process appears hung indefinitely"), making it self-diagnosable. This level of operational detail is unusual in skill files.
Prompt 2: SKILL.md — Peer AI Disagreement Protocol (verbatim)
Source: plugins/skill-codex/skills/codex/SKILL.md
### When Codex is Wrong
1. State your disagreement clearly to the user
2. Provide evidence (your own knowledge, web search, docs)
3. Optionally resume the Codex session to discuss the disagreement. **Identify yourself as Claude** so Codex knows it's a peer AI discussion. Use your actual model name (e.g., the model you are currently running as) instead of a hardcoded name:
```bash
echo "This is Claude (<your current model name>) following up. I disagree with [X] because [evidence]. What's your take on this?" | codex exec --skip-git-repo-check resume --last 2>/dev/null
- Frame disagreements as discussions, not corrections - either AI could be wrong
- Let the user decide how to proceed if there's genuine ambiguity
**Prompting technique**: Identity-injection for peer AI communication. Claude Code is instructed to identify itself by name when resuming a Codex session to dispute findings — creating a named peer-AI dialogue. This is the most sophisticated AI-to-AI communication protocol in the corpus.
---
## Prompt 3: SKILL.md — Thinking Token Suppression (verbatim)
Source: `plugins/skill-codex/skills/codex/SKILL.md`
IMPORTANT: By default, append 2>/dev/null to all codex exec commands to suppress thinking tokens (stderr). Only show stderr if the user explicitly requests to see thinking tokens or if debugging is needed.
**Prompting technique**: Default-behavior override with opt-in exception. By making `2>/dev/null` the default and requiring explicit user request to show thinking tokens, the skill prevents the most common source of context bloat in Codex integrations.