Codex: delegating website tickets from Linear¶
Website tickets go to Codex, OpenAI's Codex-for-Linear agent: it runs in
OpenAI's cloud, bills against your ChatGPT plan, and drafts a PR. Everything
else stays on the Factory, which needs ./bootstrap.py --branch
and a local subscription identity.
Environments belong to a ChatGPT account and we use personal accounts, so each person who delegates sets up their own. Do it when you need it.
Short version¶
- Codex settings → Environments
→ Create environment on
inboundx/inboundx. - Env var
CODEX_ENV_NODE_VERSION=24. Setup and maintenance script bothbash website/bootstrap.sh --sparse. No secrets, internet at default. - Install the Codex integration from
Codex settings, then
@Codexonce on any Linear issue to link your account. - Delegate:
@Codex <task> in inboundx/inboundx.
Steps¶
1. Create the environment¶
At chatgpt.com/codex/settings/environments, click Create environment. One environment per repository.
| Setting | Value |
|---|---|
| Repository | inboundx/inboundx |
| Environment variable | CODEX_ENV_NODE_VERSION=24 |
| Setup script | bash website/bootstrap.sh --sparse |
| Maintenance script | bash website/bootstrap.sh --sparse |
| Internet access (agent phase) | default (disabled) |
| Secrets | none |
Register the script as both. Setup runs on container create, maintenance on cache resume — setup-only means the scoping lapses on every resumed container.
No secrets needed: the site builds with NEXT_PUBLIC_ROSE_API_KEY and
PUBLIC_KEYSTATIC_GITHUB_APP_SLUG unset. Internet stays off because setup
scripts always have network and astro build runs offline.
website/bootstrap.sh --sparse installs deps and sparse-checkouts the tree to
website/, so backend/ and frontend/ are not on disk. It fails the build if
that did not apply. It is a guardrail, not a sandbox — git sparse-checkout
disable undoes it.
2. Link Linear¶
Install the Codex integration from
chatgpt.com/codex/settings, then mention
@Codex once in a comment on any issue.
3. Delegate¶
Assign the issue to Codex, or comment:
Pin the repo — environment selection is ambiguous otherwise. Codex bases work on
the default branch (develop), so drafted PRs target correctly.
Preview URLs¶
Every PR touching website/** gets one from the preview-website job in
.github/workflows/deploy-website.yml: wrangler versions upload
--preview-alias pr-<n> publishes a version without deploying it, so live
staging is untouched and only the aliased URL serves the PR. Posted as a sticky
comment, re-points on every push. Builds with CLOUDFLARE_ENV=staging, which is
baked into dist/server/wrangler.json — a preview cannot reach production.
If the URL is missing: preview_urls is trigger-class config that
versions upload cannot apply. It takes effect only after a full deploy:
Known gaps¶
- Codex cloud screenshot support is unverified. Linear's own coding sessions do capture them; if Codex does not, visual evidence stays Factory-only.
- Local and cloud Codex tasks share one 5-hour quota window.
- The environment spans the whole monorepo; only the working tree is scoped. Watch the first few diffs.