# Set up Agent Flywheel for ChatGPT / Codex

Keep JSM_DISABLE_SELF_UPDATE=1 in each task shell so ordinary JSM commands retain the manifest-pinned executable; use verified cloud setup for tool refreshes.

Use computer use in my browser to follow these instructions and configure my cloud coding environment. Install the tools in the provider's cloud environment, not on my local computer. Use the repository I specify; ask me which repository if it is unclear. Preserve my existing setup commands, project instructions, environments and repository access settings.

## Working instructions

- Follow the actual UI labels below. The screenshots are reference captures from 8 October 2026; if the UI differs, inspect it before acting. Do not invent a missing setup control.
- Use my existing signed-in session. If sign-in, a billing change, organization permission or a network-policy approval is required, explain the exact action and ask at that point. Respect browser/computer-use approval requirements and organization restrictions.
- Public downloads require no credentials or ownership of the tool repositories. Use the network setting named in the steps: Full access is the tested option where offered; when a narrower policy is preferred or required, allow only raw.githubusercontent.com and downloads.agent-flywheel.com in addition to the provider's package-manager defaults. Keep a locked organization policy and report unavailable tools.
- Keep existing commands and settings. Merge the exact recipes below into their named fields. Do not replace unrelated setup or instruction content. Do not add secrets. Do not compile tools from source or run the full VPS installer.
- Stop if this provider cannot supply a compatible, writable Linux x86_64 setup shell or retain installed files. For a documented but untested provider, verify compatibility rather than promising installation.

## Provider and evidence

Prepare and publish the environment once. Include the tool instructions when starting each new task.

**Hosted test.** Fresh hosted tasks reused all eleven executables. Automatic Start/repository-skill discovery did not work in those tests. Explicit guide loading is required; hosted MCP is not configured.

Four actual UI screenshots. The repository names are examples; choose your own project.

## Setup steps

### 1. Switch the task to Cloud

In ChatGPT's task composer, choose Work in → Cloud. The Cloud chip and Choose environment control appear above the task box.

![ChatGPT task composer with Cloud and Choose environment above the Do anything input.](https://agent-flywheel.com/cloud-agents/codex-cloud-composer.png)

1. Start in Cloud · ChatGPT, 8 Oct 2026

Controls to use, in order: (1) Cloud.

### 2. Open Choose environment → Create environment

Click Choose environment, then Create environment. For an existing setup, use Settings → Codex Cloud → Environments and its Edit action.

![Choose environment menu with an existing flywheel environment and Create environment.](https://agent-flywheel.com/cloud-agents/codex-create-environment.png)

2. Create an environment · ChatGPT, 8 Oct 2026

Controls to use, in order: (1) Choose environment; (2) Create environment.

### 3. Select your repositories and Get started

Search for the repository you want to work on and tick its checkbox. Click Get started. The flywheel downloads are public; you do not need to own or attach the tool repositories.

![Create a cloud environment dialog with repository search, selection checkboxes and Get started.](https://agent-flywheel.com/cloud-agents/codex-select-repositories.png)

3. Select your project, then Get started · ChatGPT, 8 Oct 2026

Controls to use, in order: (1) Repository search; (2) Get started.

### 4. Open Environment and allow the two download hosts

In the setup conversation, open the Environment panel (the sliders/settings control). Under Internet access, turn on Allow Codex to access internet.

Keep Allow domains on Package managers; choose Custom domains only if your project needs that instead. Click the pencil beside Additional allowed domains, add both hosts below, and save that editor.

- **Internet access:** Allow Codex to access internet: on
- **Additional allowed domains:** Add both hosts below

**Paste into Additional allowed domains:**

```text
raw.githubusercontent.com
downloads.agent-flywheel.com
```

**Note:** An organization policy may restrict these choices. Ask its admin to allow the public hosts if needed; adding a network secret is unnecessary.

![Environment panel showing Install script and Start skill pencil controls, internet switch, Package managers preset and Additional allowed domains.](https://agent-flywheel.com/cloud-agents/codex-environment-fields.png)

4. The script editors and network controls live here · ChatGPT, 8 Oct 2026

Controls to use, in order: (1) Allow Codex to access internet; (2) Additional allowed domains.

### 5. Paste into the Install script editor

Under Scripts, click the pencil beside Install script. Paste the script below and save the editor. Older Codex environments call this Setup.

Keep existing project dependency commands. Add these flywheel lines to the same script rather than replacing the project's setup. The tools stay in the writable repository workspace.

- **Destination:** Scripts → Install script → pencil

**Paste into Install script:**

```bash
#!/bin/bash
(
set -o pipefail
acfs_cloud_root="$(git rev-parse --show-toplevel)" || exit 1
acfs_cloud_setup="$(curl -q -fsSL --proto '=https' --proto-redir '=https' --connect-timeout 5 --max-time 20 -A 'acfs (+https://github.com/Dicklesworthstone/agentic_coding_flywheel_setup)' -H 'Accept-Encoding: identity' https://raw.githubusercontent.com/Dicklesworthstone/agentic_coding_flywheel_setup/main/scripts/claude-code-web-setup.sh)" || { printf '%s\n' 'ACFS cloud bootstrap download failed; tools were not installed. Check network access and retry.' >&2; exit 1; }
printf '%s\n' "$acfs_cloud_setup" | ACFS_CLOUD_SKILL_DIR="$acfs_cloud_root/.agents/skills/acfs-cloud-tools" ACFS_CLOUD_AGENT=codex ACFS_CLOUD_ROOT="$acfs_cloud_root/.acfs-cloud" bash || exit 1
acfs_cloud_exclude="$(git rev-parse --git-path info/exclude)" || exit 1
mkdir -p "$(dirname "$acfs_cloud_exclude")" || exit 1
printf '\n/.acfs-cloud/\n/.agents/skills/acfs-cloud-tools/\n' >> "$acfs_cloud_exclude"
) || exit 1
```

### 6. Save Start skill and keep a copy for every task

Click the pencil beside Start skill. Paste the instructions below and save the editor.

Also include these instructions in every new task. Automatic Start skill and repository-skill discovery did not work in our hosted tests; the explicit task instructions are required.

- **Destination:** Scripts → Start skill → pencil; also the new task prompt

**Paste into Task instructions / Start skill:**

```text
Find the repository root with git rev-parse --show-toplevel.
Read <repo>/.acfs-cloud/.codex/AGENTS.md for the installed flywheel tools and <repo>/.acfs-cloud/.acfs/cloud/setup.log for failures.
In each task shell, run acfs_cloud_root="$(git rev-parse --show-toplevel)/.acfs-cloud"; export PATH="$acfs_cloud_root/.local/bin:$PATH" before using the tools.
Follow the guide's CASS_DATA_DIR, CASS_MEMORY_HOME and JFP_HOME exports in each task shell so search data, memory and prompt caches use the writable workspace; preserve existing overrides and keep any XDG_DATA_HOME/XDG_CONFIG_HOME writable.
Before using Agent Mail with a read-only HOME, follow the guide's command-scoped STORAGE_ROOT recipe; reuse existing configuration and preserve DATABASE_URL.
Before using JSM with a read-only HOME, follow the guide's command-scoped XDG recipe; reuse existing configuration and check skill installation targets separately.
Keep JSM_DISABLE_SELF_UPDATE=1 in each task shell so ordinary JSM commands retain the manifest-pinned executable; use verified cloud setup for tool refreshes.
Before using MS, follow the guide's local initialization and indexing steps in a writable project; reuse existing .ms/MS_ROOT/MS_CONFIG state.
Check br --version, bv --version, ubs --version and jsm --version before starting work.
Use br ready --json and bv --robot-triage; never open their interactive TUIs.
```

### 7. Run setup, check the log, then Publish

Ask Codex in the setup conversation to run the saved Install script and check the generated setup log and tool versions. Resolve missing tools before relying on them.

Save the environment draft, then choose Publish. Wait for Environment published. Saving the script alone does not prepare the filesystem used by new tasks.

**Paste into Setup verification request:**

```text
Run the saved Install script if it has not run yet. Read <repo>/.acfs-cloud/.acfs/cloud/setup.log and <repo>/.acfs-cloud/.codex/AGENTS.md. Prepend <repo>/.acfs-cloud/.local/bin to PATH, preserving its existing entries, and run --version for br, bv, am, mcp-agent-mail, ubs, cass, cm, ms, ast-grep, jsm and jfp. If the repository already has a .beads tracker, run br ready --json and bv --robot-triage from its root and report any failures. Report each failure and confirm the prepared files are present before I publish this environment.
```

### 8. Start a new task with the tool instructions

Select Start a new task, or choose this published environment in the Cloud composer. Add your task and the instructions from step 6.

After setup changes, save and Republish, then test a new task. Existing tasks keep their own filesystem and do not receive the new snapshot. Hosted Agent Mail MCP is not configured by this recipe.

## Completion and handoff

Run the first-session verification from this guide. Check every executable: br, bv, am, mcp-agent-mail, ubs, cass, cm, ms, ast-grep, jsm and jfp. Read the setup log and tool guide at the paths in the recipe. Report each missing or failed tool and its log reason; setup exit 0 alone is not installation success. Check a fresh task/session after saving or publishing to confirm the tools persist and the agent loads the guide.

Tell me which environment/project you configured, which settings and fields changed, which tools were verified, any missing tools or blocked steps, and what I must include in later tasks. Do not claim success before the runtime checks pass. Keep edits to provider setup only; do not commit project changes or start unrelated coding work.

Visual guide: https://agent-flywheel.com/cloud-agents#codex
