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.
The ChatGPT app
paperctl start codex configures Codex for that one terminal launch. To capture the ChatGPT desktop app and the IDE extension — or make plain codex launches route through paper persistently — see Capture the ChatGPT app.
Verify the capture
paperctl sessions list
The session appears at the top with its turn count, cost, and status. Codex subagents — spawn_agent threads, however deeply nested — appear inside that one session, each under the tool call that spawned it, and the session’s usage and cost totals include them.
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.