| When this happens | The server does | You get |
|---|---|---|
| A new error shows up in Sentry | Opens a GitHub issue with the stack trace and breadcrumbs, then Codex writes a fix with a regression test | A draft pull request |
| Someone adds the label codex to a Linear task | Starts a Codex run that implements the task | A pull request attached to the Linear task |
| Support tags a Crisp chat with triage | Asks an AI model whether it's a bug, a feature request, a question or spam | A private note in Crisp, and for a bug an issue or a draft fix |
| Monday comes | Pulls last week's numbers from PostHog | A report in Slack |
| You push to production | Codex reads the commits | A pull request with a changelog note |
.github/ or .agents/, so the agent can't rewrite its own workflow.hooks.example.com), one for the admin (admin.example.com).Loading editor...
curl -fsSL https://raw.githubusercontent.com/prlct/automation-server/main/scripts/deploy-vps.sh | sudo bash
/opt/automation-server.env with mode 600ufw is on, and starts everything behind Traefik with HTTPS.env:Loading editor...
sudo /opt/automation-server/scripts/deploy-vps.sh
IMAGE_TAG=sha- in .env to pin the previous build and run the script again. Set it back to latest to follow main./webhooks/* and /health on the webhook domain. Everything else there answers 404, including the admin's API.

| Permission | Access | Why |
|---|---|---|
| Issues | Read and write | Sentry and Crisp create issues |
| Actions | Read and write | Linear and Crisp start workflows, the admin shows runs |
| Contents | Read and write | The admin installs workflow files |
| Pull requests | Read and write | Installing in pull request mode opens a PR |
| Workflows | Read and write | GitHub requires it for any change in .github/workflows/ |
owner/name and click Test connection.codex login and finish the login in the browser. This writes ~/.codex/auth.json.CODEX_AUTH_JSON and paste the whole file. On a Mac, pbcopy < ~/.codex/auth.json copies it.
GH_PAT_FOR_SECRET_WRITE: a fine-grained token with Secrets: Read and write on this repository. The workflow then saves the new login back after each run.auth.json into an issue, a pull request or a screenshot. The workflow also refuses to open a PR whose text contains a value from it.CODEX_REASONING_EFFORT to high or leave it unset (the default is high). Without an explicit effort, Codex can run with reasoning turned off. CODEX_MODEL picks the model.OPENAI_API_KEY instead, which works in public repositories too. The issue fix and Linear workflows need CODEX_AUTH_JSON.
| Workflow | Starts when | You get |
|---|---|---|
codex-issue-fix.yml | A team member opens an issue, or the server starts it for a Sentry or Crisp issue | A draft PR with a fix and a regression test |
linear-implement.yml | The server sees the trigger label on a Linear task | A PR ready for review, attached to the task |
codex-changelog.yml | A push to your production branch | A PR with a changelog note |
codex-seo-autopilot.yml | Every day at 06:00 UTC | A PR with SEO fixes for your site |
.agents/skills/ that tells Codex how to do the job. The same Install button adds it. In pull request mode, merge the PR the admin opened: GitHub only runs a workflow once it's on the branch it starts from.fix-issue came from another project and names that project's check commands (npx tsc --noEmit, npx vitest run, npm run lint). Swap in your own, or Codex will run the wrong checks.sentry appears.error and fatal events become issues. Set SENTRY_ENVIRONMENTS=production to skip staging noise. A repeat alert for the same Sentry issue doesn't open a second GitHub issue.codex.
ENG-42: ...), so Linear attaches it. Running it again for the same task updates the same PR.triage segment. Start in shadow mode, which only writes a private note with the verdict. Switch to issue to open GitHub issues for bugs, or fix to start Codex on them too. A free Crisp plan can't receive private notes over the API, so use issue mode there. Personal data is stripped before the model sees the chat, and the customer never gets a message from the server.
| You see | Fix |
|---|---|
401 or 403 from GitHub | The token lacks a permission from step 3, or it expired |
404 when starting a workflow | The workflow isn't merged into the branch yet, or the token can't see the repo |
| The run fails on gh pr create | Actions aren't allowed to create pull requests yet |
CODEX_AUTH_JSON is not set | The secret is missing or sits in another repository |
| Sentry webhook rejected | The client secret in the admin doesn't match the integration. Copy it again |
SETTINGS_ENCRYPTION_KEY stable. Change it and every secret saved in the admin becomes unreadable.Focus on customers and sales while we handle product delivery. Hire a dedicated AI maker or a whole product team.