Skip to content

Codex (optional)

Jobs run with Claude by default. You can also run some with OpenAI’s Codex, on your ChatGPT plan. It is optional: nothing changes until you connect it, and your Runner and jobs stay as they are.

  1. In ChatGPT, open Settings, Security and login, and turn on Enable device code sign-in for Codex (near the bottom). The sign-in below needs it.

  2. Open /setup on CloudCLI’s address. Find the Optional: Codex card, after step 4, and press Start.

  3. The card shows a link, auth.openai.com/codex/device, and a one-time code. Open the link, sign in to ChatGPT and enter the code within 5 minutes.

  4. The card updates once ChatGPT confirms, and says connected. Paperclip now has an agent named Codex.

Paperclip runs the sign-in on its own server and keeps the ChatGPT credential, encrypted, as one of its AI connections (“ChatGPT (Codex jobs)”). It refreshes it on its own. The credential never passes through CloudCLI.

If the code expires, or ChatGPT says device code sign-in is off, press Start again for a new code.

Ask Claude in CloudCLI, as for any job, and say Codex:

Every Friday at 16:00, summarize this week's merged pull requests. Run it with Codex.

Claude writes the skill as usual and gives the job to the Codex agent (--agent Codex). To move an existing job:

You ask Claude runs
“Run the digest with Codex.” update "<job>" --agent Codex
“Run the digest with Claude again.” update "<job>" --agent Runner

Then test it as usual: run it now, then read its log. log shows Codex’s messages and the commands it ran.

  • The same skill. Codex reads the job’s skill from .claude/skills/<name>/SKILL.md in your repo, like Claude, and skips settings meant only for Claude Code. Claude writes skills as plain steps either agent can follow.
  • The same rules. The Codex agent’s instructions match the Runner’s: pull first, run the named skill, close the task in the same run, stop and say so when a login is missing.
  • The same record. The job’s entry in .claude/jobs.json says "agent": "Codex", so restore gives it back to Codex on a new server.
  • Its own usage. Codex jobs count against your ChatGPT plan, not your Claude plan.
  • GitHub access comes from the setup page’s GitHub step, as for the Runner.

The same card has a second button, Sign in Codex in CloudCLI, for Codex in CloudCLI’s own chats and terminal. It is a separate sign-in, with its own code: Codex’s sign-in can’t be shared between two servers, since each would sign the other out.

Codex chats in CloudCLI don’t get the template’s instructions or the jobs skill. Create and manage jobs from a Claude chat.

  • A ChatGPT Business or Enterprise workspace may have device code sign-in turned off by its admin. This hasn’t been tested.
  • Codex uses its own default model. A model you pick on the Codex agent’s page in Paperclip is kept.
  • Keys for Codex jobs: Paperclip keeps variables whose names contain KEY, SECRET or TOKEN out of the commands Codex runs. So a Codex job’s keys are named without those words, for example TELEGRAM_BOT instead of TELEGRAM_BOT_TOKEN. Claude names them that way, and the jobs script warns otherwise. GitHub works for Codex as for the Runner: the template gives it the token under a name Paperclip lets through.
  • Codex runs with no sandbox and no approval prompts, as the Runner does: nobody is there to approve, and the job follows a written skill.
  • The template keeps the Codex agent’s instructions and working folder up to date at every start, but never creates it. Only the setup page does.

Paperclip (w/ CloudCLI) is a Railway template by AvgSoft. Paperclip, CloudCLI, Claude Code, Codex and Railway belong to their makers. Template codeDeploy on Railway