Run Codex through paper so the session is captured. Prerequisites: paperctl installed and authenticated.
Codex runs through backends paper provisions by default, so there’s no gateway setup — but how Codex authenticates with OpenAI depends on the access you have. paperctl start codex picks the route by one signal: whether OPENAI_API_KEY has a value. Either way your credential passes through to OpenAI — paperd never holds it. Pick the path that matches you.
ChatGPT-plan sign-in
Make sure OPENAI_API_KEY is unset, then start Codex. It uses its own ChatGPT sign-in:
unset OPENAI_API_KEY
paperctl start codex
If you aren’t signed in yet, Codex prompts you to run codex login — run it, then start again.
Your own OpenAI API key
Export it first, then start Codex:
export OPENAI_API_KEY="<your-key>"
paperctl start codex
A shared team key
An admin stores one OpenAI key on the gateway so teammates don’t each bring their own. Setup and the exact launch command are in Custom backends.
Verify the capture
paperctl sessions list
The session appears at the top with its turn count, cost, and status.
If something’s off
If a Codex session shows up in paper console without turns, the auth path and the backend usually don’t match — the fix is picking the launch path above that matches your backend. Check paperctl logs and see Custom backends. More cases: CLI troubleshooting.