# Codex CLI for Enterprise Teams

> A playbook for platform teams: Codex CLI in one disposable microVM per task, keys you can revoke, a locked config, and Codex in GitHub Actions on flockvm.

- URL: https://flockvm.com/playbooks/codex-cli-enterprise
- Last updated: 2026-11-10

This playbook is for the platform, DevEx or security team that has to answer "how do we let engineers and pipelines run Codex without it running on laptops with production credentials". The answer on flockvm: each Codex run gets its own Firecracker microVM in France, created from a script with a scoped key, given only the secrets of one environment, and deleted when the run ends. The same organization runs Codex inside GitHub Actions jobs with `runs-on: flockvm`, one microVM per job.

What was checked, and how. Every Codex fact below comes from OpenAI's documentation and the `openai/codex-action` repository, read on 8 November 2026. The sandbox, config and flag checks marked *measured* were run that day in a flockvm VM built on the Agent image, with Codex CLI 0.167.0 installed fresh from npm on a CPU without AVX2. We had no OpenAI key in that VM, so no model call was made, and `openai/codex-action` has not been run on a flockvm runner yet: the CI section says what to check before you rely on it.

## Who this is for

- **Platform and DevEx teams** rolling Codex out to a few dozen engineers, who want one way to run unattended tasks (`codex exec`) that is the same for everyone.
- **Security teams** who read OpenAI's own advice, "only use inside an externally hardened environment" for `--yolo`, and need to say where that environment is.
- **CI owners** who want Codex reviews or fixes in GitHub Actions without paying GitHub-hosted minutes for jobs that mostly wait on a model.

It is not for open-source projects: flockvm runs CI jobs of private repositories only.

## The problem with Codex on laptops and shared runners

Codex is safe by default and slow by default: `codex exec` "runs in a read-only sandbox", the network is off in `workspace-write`, and the interactive CLI asks before it leaves the workspace. Teams loosen that to get work done, and the loosening lands on the wrong machine:

- **On a laptop**, `--yolo` (no approvals, no sandbox) gives the agent the engineer's SSH keys, cloud credentials, other repositories and the Codex login in `~/.codex`.
- **In a container**, OpenAI's docs say Codex's Linux sandbox "may not work" if the container blocks namespaces, and that with full access "a malicious project can exfiltrate anything available inside the devcontainer, including Codex credentials".
- **On a reused self-hosted runner**, the default safety strategy of `openai/codex-action` revokes the runner user's sudo, and its README warns those changes "can outlive a job on reused self-hosted runners; use this strategy on disposable runners".

All three point at the same fix: run Codex on a machine that exists for one task and is destroyed after.

## The architecture on flockvm

| | Path A: one VM per task | Path B: one VM per CI job |
|---|---|---|
| Trigger | A script, a scheduler, an internal tool, or an engineer | A GitHub Actions workflow with `runs-on: flockvm` |
| Machine | A microVM from the Agent image, Codex preinstalled | A microVM from the runner image, Codex installed by `openai/codex-action` |
| Secrets | A flockvm [environment](/docs/vms/environments): variables and secret files written at first boot | GitHub Actions secrets; the OpenAI key held by the action's proxy |
| Repository | Cloned at first boot with a read-only token that expires within the hour | `actions/checkout` |
| Who creates the VM | A flockvm API key with the **Create and use VMs** preset, restricted to that environment | flockvm, from GitHub's `workflow_job` webhook |
| End of life | You delete it (the script does) | Deleted when the job ends; nobody can SSH in |

What flockvm gives you in both paths, from its own docs: a fresh Firecracker microVM with its own kernel, deleted at the end; VM disks, checkouts and secrets on one server in France; [scoped API keys](/docs/api/api-keys) with expiry, IP allowlists and rotation; and, for organizations with Enterprise turned on, an [audit log](/docs/team/audit-log) of who created which VM, environment and key.

What it does not give you, said plainly:

- **No egress filtering.** VMs and runners have open outbound Internet access (private ranges, cloud metadata, other VMs, the host and port 25 are blocked). Anything the agent can read, it can send out. Codex's own domain rules (`[features.network_proxy]`) or your proxy are the controls.
- **No record of what the agent did inside the VM.** The audit log sees VMs, environments and keys, not commands or prompts. Codex's telemetry (`[otel]`, off by default) and OpenAI's Compliance API (Enterprise) are where prompts and tool calls are recorded.
- **Prompts leave the host.** They go to OpenAI under your account; see [EU data residency](/eu-data-residency) for the routes OpenAI offers.

## Step 1: pick how Codex signs in

Data handling follows the sign-in method, per OpenAI: with an API key, usage follows "the API organization's retention and data-sharing settings"; with ChatGPT sign-in, it follows "ChatGPT workspace permissions, role-based access control (RBAC), and ChatGPT Enterprise retention and residency settings".

| Method | What OpenAI recommends it for | How it reaches Codex | Fits |
|---|---|---|---|
| API key | "programmatic Codex CLI workflows, such as CI/CD jobs" | `CODEX_API_KEY` for `codex exec`, or `printenv OPENAI_API_KEY \| codex login --with-api-key` | Both paths; billed at API rates |
| Codex access token | "trusted scripts, schedulers, and private CI runners", ChatGPT Business and Enterprise | `CODEX_ACCESS_TOKEN`, or `codex login --with-access-token`; created at chatgpt.com/admin/access-tokens once an admin grants the permission; shortest custom validity 1 day | Teams on a ChatGPT workspace |
| ChatGPT sign-in | People at a terminal | `codex login --device-auth` (beta; enable device code login first) or a copied `~/.codex/auth.json` | Interactive VMs only |

Two details that save a debugging session:

- *Measured*: `codex exec` 0.167.0 sends the key in `CODEX_API_KEY` without any login, and sends nothing with only `OPENAI_API_KEY` set. Name the variable `CODEX_API_KEY`, or run `codex login --with-api-key` first.
- Codex Cloud and `@codex` review on GitHub need ChatGPT sign-in and run "in isolated OpenAI-managed containers", not on your machines. This playbook covers the CLI.

To keep engineers from signing in with a personal account on a company VM, Codex has `forced_login_method = "chatgpt" | "api"` and `forced_chatgpt_workspace_id` in its config: if the credentials don't match, Codex logs out and exits. The admin-enforced versions (`allowed_login_methods`, `allowed_chatgpt_workspaces`) go in `/etc/codex/requirements.toml`.

Whatever you pick, use a credential you can revoke: an API project key with a spend limit, or an access token with a short validity. It will sit in the VM where the agent can read it.

## Step 2: put the key and the team config in an environment

Create a dedicated environment, keep it from members, and load the key from a file so it never lands in a shell history:

```bash
flockvm env create codex
flockvm env update codex --members-can-use off
flockvm env set CODEX_API_KEY=- --env codex < ~/secrets/codex-project-key.txt
```

With **Members can use it** off, only owners and admins can create VMs with this environment, which is the point: anyone who creates a VM with it can print its values from a shell. For automation, the API key that creates the VMs is restricted to this environment (step 4).

Then give every VM the same Codex settings with a secret file. Codex reads profile files from `$CODEX_HOME/<name>.config.toml` and `--profile <name>` layers one on top of the user config, so a file at `.codex/team.config.toml` in the environment becomes `/home/user/.codex/team.config.toml` in each new VM, next to the Agent image's own `config.toml`:

```toml
# team.config.toml: no prompts, Codex's sandbox kept, network on inside it
approval_policy = "never"
sandbox_mode    = "workspace-write"

[sandbox_workspace_write]
network_access = true

# Hide variables whose names contain KEY, SECRET or TOKEN from the commands Codex runs
[shell_environment_policy]
ignore_default_excludes = false

[feedback]
enabled = false
```

```bash
flockvm env file add .codex/team.config.toml ./team.config.toml --env codex
```

Why each line:

- `workspace-write` with `never` is OpenAI's documented non-interactive setup: no prompts, writes stay in the workspace, and `.git`, `.agents`, `.codex` and `.aws` inside it stay read-only. *Measured* in a flockvm VM: Codex's sandbox starts there, with or without the `bubblewrap` package on the PATH (without it, Codex uses its bundled helper, which needs unprivileged user namespaces, and those work in flockvm guests). A write in the workspace succeeded; writes to `.git` and to the home folder were refused.
- `network_access = true` is there because most tasks run `npm install` or `pip install`. Leave it out for review-only tasks. For domain rules, OpenAI's docs add `[features.network_proxy]`: domain rules alone do not turn the proxy on.
- `ignore_default_excludes = false` turns on Codex's filter for `KEY`, `SECRET` and `TOKEN` variables, which is off by default. *Measured* with `codex sandbox`: `DEMO_API_KEY` disappeared from the child's environment, `DEMO_PLAIN` stayed. It keeps `CODEX_API_KEY` out of the commands the agent runs; it does not stop a command from reading `/etc/flock/env`, where flockvm stores the VM's variables for the login user.

If you would rather make the VM the only boundary, the profile is `approval_policy = "never"` and `sandbox_mode = "danger-full-access"`, the same as `--yolo`. [Codex --yolo mode](/learn/codex-yolo-mode) covers what that turns off.

## Step 3: lock the settings that matter

Codex reads admin-enforced constraints from `/etc/codex/requirements.toml`; users cannot override them. The docs' example blocks the full-access sandbox:

```toml
# /etc/codex/requirements.toml
allowed_sandbox_modes = ["read-only", "workspace-write"]
```

*Measured* with Codex 0.167.0: with that file present, `codex exec --yolo` and `codex exec -s danger-full-access` stop at once with an error: `approval_policy = "never"` "cannot be used because requirements do not allow" `sandbox_mode = "danger-full-access"`. `-s workspace-write` starts. On Codex 0.138.0 and later, OpenAI prefers `allowed_permission_profiles` with `default_permissions`.

An environment's secret files go under the login user's home, so the script writes this one over SSH after the VM boots (step 4). Know its limit: `user` has passwordless `sudo` on the Agent image, so an agent that decides to can delete the file. In a VM, requirements catch mistakes and drift; in CI, where `codex-action` removes sudo first, they hold.

OpenAI's managed configuration can also come from the cloud (Business and Enterprise) or a configuration server you host. On a disposable VM, a file the script writes is the simplest source.

## Step 4: run one task per VM

Create an API key for the script in **Settings → API keys**: preset **Create and use VMs** (it can delete only the VMs it created), restricted to the `codex` environment, with an expiry and, if the script runs from fixed addresses, an IP allowlist. Add the repository to the environment's **GitHub repositories**, so each VM clones it at first boot with a read-only token that expires within the hour. The VM can read the code and cannot push: the patch comes out, and your own pipeline or an engineer opens the pull request. That is the split OpenAI's docs describe for auto-fix jobs: Codex works without write access, and the step that opens the pull request gets no OpenAI key.

```bash
#!/bin/bash
# codex-task.sh
# Usage: FLOCKVM_API_KEY=… ./codex-task.sh fix-auth-1 "Fix the failing auth tests"
set -euo pipefail
name="$1"; task="$2"
repo=web-app          # the environment clones acme/web-app into ~/web-app

flockvm vm create "$name" --size default --env codex --wait
trap 'flockvm vm delete "$name" --yes; rm -f "$name.known_hosts"' EXIT   # on success and on failure

# Each new VM has new host keys: accept them once, in a file of this run's own
vm() { flockvm vm ssh "$name" -- -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile="$name.known_hosts" "$@"; }

# The admin constraints of step 3
vm -n "sudo mkdir -p /etc/codex && echo 'allowed_sandbox_modes = [\"read-only\", \"workspace-write\"]' | sudo tee /etc/codex/requirements.toml > /dev/null"

# The task goes in through standard input, so no quoting gets in the way
printf '%s' "$task" | vm 'cat > ~/task.txt'

# Wait for the environment's repositories: they clone in the background after boot
vm -n 'timeout 300 bash -c "until journalctl -u flock-repos -q --no-pager | grep -q \"cloned for\"; do sleep 2; done"'

vm -n "
  cd ~/$repo
  codex exec --profile team --ephemeral --json -o ~/result.md \"\$(cat ~/task.txt)\" > ~/events.jsonl 2> ~/codex.log
  git add -A && git diff --cached > ~/codex.patch
"

vm -n 'cat ~/result.md' > "$name.md"
vm -n 'cat ~/codex.patch' > "$name.patch"
vm -n 'cat ~/events.jsonl' > "$name.jsonl"
```

What the flags do, from OpenAI's CLI reference: `--ephemeral` writes no session files, `--json` prints JSONL events (`turn.completed` carries token usage, handy for chargeback), and `-o` writes the final message to a file. Add `--output-schema schema.json` when a program reads the answer. Codex requires a Git repository; `--skip-git-repo-check` lifts that for other folders.

The clone runs in the background after boot, so the script waits for the clone service's last log line, "… cloned for user", rather than for a `.git` folder, which exists as soon as `git clone` starts; a large repository takes a few seconds more than SSH. The `trap` deletes the VM when the script exits, on an error too, so a failed step does not leave a VM running, billing, with the API key inside. The key that runs the script acts with its user's role, and an environment with **Members can use it** off needs an owner or admin: create the key from such an account. Each new VM has new SSH host keys and ports are reused eventually, so every SSH call accepts the new VM's key once and keeps it in a known-hosts file of that run: the script runs unattended, from cron or CI, without "Host key verification failed" (see [host key changes](/docs/vms/ssh#host-key-changes)). Each run's VM is gone at the end, its copy of the key with it. If a run looked wrong, rotate the OpenAI key as well.

## Step 5: run tasks in parallel

One VM per task is the whole parallelism model: start the script several times. VMs of one task share nothing, no ports, no database and no `node_modules`, so ten attempts at the same bug don't collide.

```bash
for i in 1 2 3; do
  ./codex-task.sh "fix-auth-$i" "Fix the failing auth tests" &
done
wait
```

There is no per-organization VM quota: the host's capacity applies, and a `vm create` the host cannot fit is refused with `409 capacity`. During the free trial, 2 VMs run at once. [Codex parallel tasks](/learn/codex-parallel-tasks) compares this with Codex Cloud attempts and local worktrees, and the [parallel agents guide](/docs/agents/parallel-agents) has the batch scripts.

## Step 6: Codex in GitHub Actions on flockvm runners

Connect the repositories on the CI page ([setup](/docs/ci/setup)) and use a flockvm label. A Codex job mostly waits on the model, so start reviews on `flockvm-small` (2 vCPU, 4 GB): that is OpenAI's minimum of 4 GB of RAM. OpenAI recommends 8 GB, so give jobs that also build or test `flockvm` (4 vCPU, 8 GB).

Status, said up front: none of the workflows below has been run end to end on a flockvm runner. What we checked is listed with each.

### Recommended: openai/codex-action

OpenAI's docs are explicit: "For GitHub Actions workflows, use openai/codex-action instead of installing Codex and passing the API key to a shell step. The action starts a secure proxy for the OpenAI API key." That is the path this playbook recommends.

`openai/codex-action@v1` (v1.13) installs Codex, holds the API key in a local Responses API proxy, and by default (`safety-strategy: drop-sudo`) revokes the runner user's sudo and removes its access to root-owned sockets under `/run`, Docker's included, before starting Codex. Those changes are irreversible for the machine, which is why OpenAI's README says to "use this strategy on disposable runners and run the action as the last step in a job". A flockvm runner VM is deleted after its job.

Its README lists, for `drop-sudo` on Linux: passwordless `sudo`, `/usr/bin/setpriv`, `/usr/bin/setfacl` (the `acl` package), ACL support on `/run`, and working unprivileged user namespaces. What we know of the flockvm runner image:

- passwordless `sudo` for `runner` (the user the action expects) and the `acl` package, from its build script; `setpriv` ships with util-linux on Ubuntu;
- unprivileged user namespaces work in flockvm guests (*measured*: `unshare -Ur true` succeeds, `user.max_user_namespaces` is 15734, no AppArmor restriction);
- ACL support on `/run`: not tested. `/run` is a tmpfs on Ubuntu, which normally supports ACLs, but nobody has run `setfacl` there on a flockvm runner yet.

The catch: the action's step that enables user namespaces runs only when `runner.environment == 'github-hosted'`, and, in the README's words, "Sandbox-backend startup errors occur after the irreversible account and socket cleanup, so validate self-hosted runner configurations on disposable hosts." So run one test job first:

```yaml
name: codex-action check
on: workflow_dispatch

jobs:
  check:
    runs-on: flockvm-small
    permissions:
      contents: read
    outputs:
      final_message: ${{ steps.run_codex.outputs.final-message }}
    steps:
      - uses: actions/checkout@v5
        with:
          persist-credentials: false
      - name: Check user namespaces and ACLs on /run
        run: |
          unshare -Ur true && echo "user namespaces: ok"
          sysctl user.max_user_namespaces
          sudo touch /run/acl-check && sudo setfacl -m u:runner:r /run/acl-check && echo "ACL on /run: ok"
          sudo rm -f /run/acl-check
      - name: Run Codex
        id: run_codex
        uses: openai/codex-action@v1
        with:
          openai-api-key: ${{ secrets.OPENAI_API_KEY }}
          permission-profile: ":workspace"
          prompt: "List the top-level files of this repository, then stop."

  report:
    runs-on: ubuntu-latest   # a few seconds on GitHub's runner, rather than one of flockvm's 4 runner slots
    needs: check
    steps:
      - run: echo "$MSG"
        env:
          MSG: ${{ needs.check.outputs.final_message }}
```

When it passes, OpenAI's own pull request review example from the action's README works with one change: `runs-on: ubuntu-latest` → `runs-on: flockvm-small` in its `codex` job. That job has `contents: read` and the action as its last step; the second job, `post_feedback`, has `issues: write` and `pull-requests: write`, posts `final-message` and never sees the key, so it can stay on `ubuntu-latest`. The action's default access check only lets users with write access trigger it. Add a `concurrency:` group per pull request (`group: codex-review-${{ github.event.pull_request.number }}`, `cancel-in-progress: true`) so a busy pull request does not take every runner slot. If Codex's sandbox fails inside the VM, the fallback is `sandbox: danger-full-access` in place of `permission-profile` (the two inputs are mutually exclusive), with `drop-sudo` kept: the microVM is then the isolated runner OpenAI's flag text asks for.

### Not recommended: plain codex exec in a step

Installing Codex in the job and running `codex exec` with the key in a shell step is what OpenAI advises against, quoted above. Keep it for a runner where the action cannot work, and know what it exposes:

- **The key is readable by the job.** OpenAI: "Do not set `OPENAI_API_KEY` or `CODEX_API_KEY` as a job-level environment variable in workflows that check out or run repository-controlled code. Build scripts, tests, dependency lifecycle hooks, or a compromised action in the same job can read those environment variables." Even on one step, the key sits in that step's environment.
- **`runner` keeps passwordless `sudo`.** Nothing drops it, unlike the action's `drop-sudo`.
- **Codex passes variables named `*KEY*`, `*SECRET*` and `*TOKEN*` to the commands it runs** unless you set `shell_environment_policy.ignore_default_excludes=false`: its default is `true`. The workflow below sets it with `-c`.
- **Prompt injection can exfiltrate the key.** A pull request that tells Codex to print its environment can get `CODEX_API_KEY` written into `review.md`, and the artifact is downloadable by anyone with read access to the repository. Run it only on pull requests from people with write access, read the review before you publish it anywhere, and give the job an OpenAI project key with a spend limit that you can revoke at once.

```yaml
name: Codex review (plain codex exec, not recommended)
on:
  pull_request:
    types: [opened, synchronize]

concurrency:
  group: codex-review-${{ github.event.pull_request.number }}
  cancel-in-progress: true

jobs:
  review:
    # Same-repository pull requests only: a fork's pull request gets no secrets anyway
    if: github.event.pull_request.head.repo.full_name == github.repository
    runs-on: flockvm-small
    timeout-minutes: 20
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v5
        with:
          persist-credentials: false
          fetch-depth: 0
      - run: npm install -g @openai/codex
      - name: Run Codex
        env:
          CODEX_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          BASE_SHA: ${{ github.event.pull_request.base.sha }}
        run: |
          codex exec --ephemeral --sandbox read-only \
            -c shell_environment_policy.ignore_default_excludes=false \
            -o "$RUNNER_TEMP/review.md" \
            "Review the changes since $BASE_SHA (git diff $BASE_SHA...HEAD). List bugs and risks only."
      - uses: actions/upload-artifact@v4
        with:
          name: codex-review
          path: ${{ runner.temp }}/review.md
```

What we checked: the runner's `node` is Node.js 24 and `runner` may `npm i -g`; Codex 0.167.0 installed fresh from npm runs on a CPU without AVX2 (*measured* on the Paris host, retired on 2026-11-10); Codex's sandbox works in a flockvm guest without bubblewrap (*measured*, step 2), and the runner image has no bubblewrap. Without a cache, npm downloads Codex in every job.

### What the CI path cannot do today

- **4 runner VMs at once, across every flockvm organization**: 4 `flockvm-small`, 4 `flockvm`, 3 `flockvm-large` or 1 `flockvm-xlarge`, on a host shared with the other VMs. Extra jobs queue. Keep the `concurrency:` group above so a busy pull request does not take every slot.
- **Private repositories only.** A public repository's job fails at once, at no cost.
- **No flockvm environment in CI.** Runner VMs get GitHub secrets only.
- **CI jobs are held during the 7-day trial**, until the first plan payment.

## Governance checklist

- [ ] Codex signs in with an API project key with a spend limit, or a Codex access token with a short validity; never a personal ChatGPT login on a shared VM.
- [ ] `forced_login_method` (or `allowed_login_methods` in requirements) matches the method you chose.
- [ ] One flockvm environment per purpose (`codex`, `codex-staging`), **Members can use it** off for the ones holding keys.
- [ ] The automation key: **Create and use VMs**, restricted to that environment, with an expiry; an IP allowlist if it runs from fixed addresses.
- [ ] Enterprise organizations: an [organization key policy](/docs/api/api-keys#organization-key-policy) (who creates keys, longest lifetime, no full-access keys for members, an org-wide IP allowlist).
- [ ] `team.config.toml` in the environment: `workspace-write`, `ignore_default_excludes = false`; `/etc/codex/requirements.toml` written at boot.
- [ ] Repositories cloned read-only by the environment; pull requests opened outside the VM, by a step that has no OpenAI key.
- [ ] Every VM deleted by the script that created it; the audit log (Enterprise) shows `vm.created` and `vm.deleted` with the key's name.
- [ ] Codex `[otel]` telemetry or OpenAI's Compliance API for prompt-level records, since flockvm does not see inside the VM.
- [ ] Egress: Codex's network proxy rules or your own proxy if you need an allowlist; flockvm has none.
- [ ] In CI: `openai/codex-action` as the last step of the Codex job (not the key in a shell step), `permissions: contents: read` on that job, comments posted by a job without the key, `timeout-minutes` set, `concurrency:` groups.

## What it costs

flockvm bills VMs and runner jobs per second; OpenAI bills the model usage on your API or ChatGPT account, separately.

| What | flockvm price | Example |
|---|---|---|
| Task VM, `small` (2 vCPU, 4 GB) | $0.016 an hour | A 30-minute task: $0.008 |
| Task VM, `default` (4 vCPU, 8 GB) | $0.032 an hour | A 30-minute task: $0.016 |
| CI job, `flockvm-small` | $0.12 an hour, $0.002 a minute | 4 minutes of steps + about 25 s of boot = 265 s: 265 ÷ 60 × $0.002 = $0.0088 |
| CI job, `flockvm` | $0.24 an hour, $0.004 a minute | The same job: $0.0177 |

For comparison, GitHub's 2-core hosted runner bills that review job at least 4 × $0.006 = $0.024, rounded up to the minute. 400 reviews a month on `flockvm-small` come to about 400 × $0.0088 = $3.52; 200 half-hour tasks on `default` VMs to 200 × $0.016 = $3.20.

The plan is $18 a month per organization, and all of it comes back as VM and CI time; past it, usage comes from a prepaid wallet. A new organization starts with a 7-day free trial (card required, nothing charged for 7 days): 25 hours of VM time, 2 VMs at once, `small` and `default` sizes. Details on [pricing](/docs/billing/pricing) and [the trial](/docs/billing/trial).

## Limits to know before you roll it out

| Area | Today |
|---|---|
| Region | France (one OVHcloud server), for VMs, CI and environments |
| Runner concurrency | 4 runner VMs at once across all organizations; queued beyond |
| CI scope | Private repositories, Linux x64 (Ubuntu 26.04), 6-hour jobs, no cache between jobs, about 25 s of cold boot per job |
| Network | Outbound open; no per-VM or per-organization egress allowlist |
| Audit | Audit log for Enterprise organizations, turned on by the flockvm team; it does not record commands or prompts inside a VM |
| Sign-in to flockvm | Google, GitHub or an email link; no SSO/SAML or SCIM |
| Compliance | No SOC 2 report, no SLA |
| Codex inside the VM | Codex's own sandbox works (measured); `requirements.toml` can be removed by an agent with sudo |

To turn on Enterprise (audit log, key policy) for your organization, write to [hello@flockvm.com](mailto:hello@flockvm.com) with its name and Organization ID.

## Gemini CLI on the same setup

Gemini CLI is preinstalled on the Agent image too, and its GitHub Action runs on flockvm runners the same way. Its auth (Gemini API key, Vertex AI, Workload Identity Federation) and admin settings differ: see [Gemini CLI for enterprise teams](/playbooks/gemini-cli-enterprise).

## Related pages

- [Run Codex CLI in a VM](/docs/agents/codex): the interactive setup, sign-in routes and tmux.
- [Codex --yolo mode](/learn/codex-yolo-mode): what the bypass flag turns off and where to run it.
- [Codex parallel tasks](/learn/codex-parallel-tasks): Codex Cloud, worktrees or one VM per task.
- [Running agents with skip-permissions safely](/learn/dangerously-skip-permissions-safely): the same question for Claude Code.
- [GitHub Actions runners on flockvm](/github-actions-runners) and [CI security](/docs/ci/security): what one VM per job protects.
- [Environments](/docs/vms/environments), [API keys and scopes](/docs/api/api-keys), [Audit log](/docs/team/audit-log).
- [EU data residency](/eu-data-residency): what stays in France and what goes to the model provider.

## Sources

- [OpenAI Codex docs: Non-interactive mode (codex exec, CODEX_API_KEY, read-only default, CI auth, auto-fix pattern)](https://learn.chatgpt.com/docs/non-interactive-mode) (accessed 2026-11-08)
- [OpenAI Codex docs: Developer commands (codex exec flags, --yolo, codex login, codex sandbox)](https://learn.chatgpt.com/docs/developer-commands?surface=cli) (accessed 2026-11-08)
- [OpenAI Codex docs: Authentication (ChatGPT vs API key, data handling, headless login, forced_login_method)](https://learn.chatgpt.com/docs/auth) (accessed 2026-11-08)
- [OpenAI Codex docs: Access tokens (Business and Enterprise workspaces)](https://learn.chatgpt.com/docs/enterprise/access-tokens) (accessed 2026-11-08)
- [OpenAI Codex docs: Managed configuration (requirements.toml, allowed_sandbox_modes, login restrictions)](https://learn.chatgpt.com/docs/enterprise/managed-configuration) (accessed 2026-11-08)
- [OpenAI Codex docs: Admin setup (local use toggles, Codex Cloud off by default, Compliance API)](https://learn.chatgpt.com/docs/enterprise/admin-setup) (accessed 2026-11-08)
- [OpenAI Codex docs: Agent approvals and security (approval policies, protected paths, network proxy, containers)](https://learn.chatgpt.com/docs/agent-approvals-security) (accessed 2026-11-08)
- [OpenAI Codex docs: Sandboxing (modes, bubblewrap on Linux, user namespaces)](https://learn.chatgpt.com/docs/sandboxing) (accessed 2026-11-08)
- [OpenAI Codex docs: Permissions (permission profiles :read-only, :workspace)](https://learn.chatgpt.com/docs/permissions) (accessed 2026-11-08)
- [OpenAI Codex docs: Config basics (precedence, shell_environment_policy)](https://learn.chatgpt.com/docs/config-file/config-basic) (accessed 2026-11-08)
- [OpenAI Codex docs: Advanced config (profile files, model providers, feedback)](https://learn.chatgpt.com/docs/config-file/config-advanced) (accessed 2026-11-08)
- [OpenAI Codex docs: Environment variables (CODEX_API_KEY, CODEX_HOME)](https://learn.chatgpt.com/docs/config-file/environment-variables) (accessed 2026-11-08)
- [OpenAI Codex docs: Pricing (plan matrix: API key vs ChatGPT plans, Enterprise-only controls)](https://learn.chatgpt.com/docs/pricing) (accessed 2026-11-08)
- [OpenAI Codex docs: GitHub (@codex review runs on OpenAI's cloud)](https://learn.chatgpt.com/docs/third-party/github) (accessed 2026-11-08)
- [openai/codex README and install.md (system requirements, install options)](https://github.com/openai/codex/blob/main/docs/install.md) (accessed 2026-11-08)
- [openai/codex releases (rust-v0.167.0, 2026-11-06)](https://github.com/openai/codex/releases/latest) (accessed 2026-11-08)
- [npm: @openai/codex 0.167.0 (installed and run on 2026-11-08)](https://www.npmjs.com/package/@openai/codex) (accessed 2026-11-08)
- [openai/codex-action README (inputs, safety-strategy, drop-sudo, self-hosted runners, PR review example)](https://github.com/openai/codex-action/blob/main/README.md) (accessed 2026-11-08)
- [openai/codex-action action.yml (user namespace step only on github-hosted runners)](https://github.com/openai/codex-action/blob/main/action.yml) (accessed 2026-11-08)
- [openai/codex-action docs/security.md (write-access check, key protection)](https://github.com/openai/codex-action/blob/main/docs/security.md) (accessed 2026-11-08)
- [openai/codex-action CHANGELOG (v1.13, 2026-10-05)](https://github.com/openai/codex-action/blob/main/CHANGELOG.md) (accessed 2026-11-08)
- [GitHub Docs: Contexts reference (runner.environment)](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts) (accessed 2026-11-08)
