SKILL.md--- name: codex-e2e-test description: Run PR-grade real Codex E2E validation through claude-tap, including resume turns, multiple tool calls, optional image input, viewer verification, and screenshot evidence. tags: testing, e2e, codex, responses-api --- # Codex E2E Test Skill Run real end-to-end validation that starts `claude-tap` from local source, connects to the real Codex CLI via OAuth, captures OpenAI Responses API traces, and produces viewer screenshots suitable for PR evidence. Use this skill for every PR that changes capture, proxying, viewer rendering, session/dashboard behavior, client launch logic, trace ordering, content blocks, tools, token usage, or screenshot/demo assets. If a PR cannot run this flow, state why in the PR and cover the same risk with another real client trace. ## Prerequisites - `codex` CLI installed (`npm install -g @openai/codex`) and authenticated via OAuth - Python dev dependencies: `uv sync --extra dev` - Playwright installed: `uv run playwright install chromium` Verify OAuth works: ```bash codex exec "say hello" --dangerously-bypass-approvals-and-sandbox ``` If it fails with token errors, re-authenticate: ```bash codex auth login ``` ## Key Difference from Claude E2E Codex uses the **OpenAI Responses API** (`/v1/responses`) instead of Anthropic Messages API. With OAuth authentication, the upstream is `https://chatgpt.com/backend-api/codex`, **not** `https://api.openai.com`. The proxy must be told the correct target with `--tap-target`. ## Run a Real Codex E2E Trace Prefer the resume + multimodal flow below for PR evidence. The simple commands are only smoke tests for checking local setup. ### Simple (single tool call) ```bash claude-tap --tap-client codex \ --tap-target https://chatgpt.com/backend-api/codex \ --tap-output-dir /tmp/codex-e2e \ --tap-no-open \ -- exec "say hello" \ --dangerously-bypass-approvals-and-sandbox ``` ### Multi-call (triggers multiple API requests) Use a task that requires shell tool use — this forces the agent to make multiple Responses API calls (models lookup + actual responses): ```bash claude-tap --tap-client codex \ --tap-target https://chatgpt.com/backend-api/codex \ --tap-output-dir /tmp/codex-e2e \ --tap-no-open \ -- exec "Read pyproject.toml and tell me the project name and version" \ --dangerously-bypass-approvals-and-sandbox ``` Expected: 4+ API calls (2x `GET /v1/models` + 2x `POST /v1/responses`). ## Resume + Multimodal Content-Block Trace Use this flow for viewer changes that affect message rendering, content block boundaries, tool call ordering, images, or copy/select behavior. It creates a real Codex session, resumes it at least once, forces multiple shell tool calls per user turn, and attaches an actual image so the trace includes multimodal content. This is the default PR evidence flow. ### 1. Prepare an isolated workspace ```bash mkdir -p /tmp/claude-tap-real-codex-w