Learning resourcesReviewed · OpenAI

Codex local environments

Local environments is a guide for developers who want reusable project setup and commands in Codex, with availability limited to Codex in the ChatGPT desktop app. It explains automatic worktree setup, reusable actions, platform-specific scripts and the app's accompanying Git controls.

Researched 15 Nov 2026

In short.

Local environments is a documentation guide for developers who want repeatable Codex project setup and quick access to common commands, but the feature is available only in Codex in the ChatGPT desktop app. Setup scripts run automatically when Codex creates a worktree at the start of a new chat; actions provide on-demand commands through the app's top bar and integrated terminal. Configuration lives in the project's .codex folder and can be shared through Git. The page includes npm examples and describes nearby Git controls, while pricing, configuration schema and failure handling remain unspecified.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete supplied page at https://learn.chatgpt.com/docs/environments/local-environment.md: its desktop-app restriction, configuration location, setup scripts, actions, command examples and Git controls. The introductory notice points to a documentation index and explains Markdown-page access; that index and all other linked destinations are excluded. Nothing was executed. Setup, platform overrides, action execution, configuration sharing and Git operations remain untested.

The overview

Resource identity

The Local environments page documents a project configuration feature in Codex within the ChatGPT desktop app. It is an instructional resource covering setup scripts, reusable actions and built-in Git tools.

The original page is [https://learn.chatgpt.com/docs/environments/local-environment.md]. The page says configuration is stored in a .codex folder at the project root and can be committed to the project's Git repository.

Practical assessment

The guide provides a practical starting point when new worktrees need dependencies or build output, or when developers repeatedly type the same project commands. Its most useful distinction is between automatic setup when a worktree is created and actions launched when needed.

It explains where to configure the feature and gives short command examples. It does not provide a configuration file schema, troubleshooting procedures or evidence of execution reliability.

Who it helps

The intended users are developers working on local projects in Codex through the ChatGPT desktop app. Beginners get examples of dependency installation, building and starting an application; experienced developers get guidance on shared configuration, platform overrides and Git operations.

Teams that want to share project commands may benefit from committing the generated configuration to Git. This is an inferred use case supported by the page's explicit sharing guidance; consistent results across team members' machines are not demonstrated.

Documented capabilities

Setup scripts can run project preparation commands, including dependency installation and builds. Platform-specific setup scripts for macOS, Windows or Linux can override the default script.

Actions define recurring tasks such as starting a development server or running tests. They appear in the app's top bar, run in its integrated terminal, support platform-specific scripts and can have identifying icons.

The page also describes adjacent Git controls: viewing diffs, adding inline comments for Codex, staging or reverting chunks and files, committing, pushing a branch and creating a pull request.

Using it

Requirements

Local environments require Codex in the ChatGPT desktop app. The page explicitly says to select Codex before configuring or using a local environment.

Configuration belongs in the project's root .codex folder. For a repository containing multiple projects, the page directs users to open the project directory containing the shared .codex folder.

The npm examples require a project that supports those commands. Required subscription plans, app versions and toolchain versions are unspecified. Support for platform-specific script definitions does not establish desktop-app availability on every listed operating system.

How it works

Worktrees use different directories from local chats, so dependencies or files absent from Git may be missing there. Setup scripts address this preparation step by running automatically when Codex creates a new worktree at the start of a new chat.

Actions serve a separate purpose: they expose saved commands for developers to launch through the app. The commands execute in the integrated terminal. The page does not describe setup retries, failure recovery or whether setup reruns in existing worktrees.

Configuration steps

Open the appropriate project directory in the ChatGPT desktop app, select Codex and configure the local environment through app settings. Add the commands needed to prepare a new worktree, using platform-specific setup scripts when necessary.

Define actions for recurring tasks, choose identifying icons and provide platform-specific action scripts where commands differ. The generated configuration can be committed to Git for sharing. The page does not specify the generated filename or a manual editing schema.

Source examples

For a TypeScript project, the page illustrates a setup script that runs npm install followed by npm run build. This shows how dependency installation and an initial build can be attached to worktree creation.

For a Node.js project, it illustrates an action named Run containing npm start. These examples demonstrate configuration intent; the source provides no execution output or successful installation, build or startup results.

Assessment & evidence

Limitations

The feature is documented as exclusive to Codex in the ChatGPT desktop app. The page does not establish equivalent availability in other Codex interfaces.

The guide omits exact configuration filenames, schema details, failure handling and compatibility versions. It explains how setup scripts can address missing dependencies or files, but does not establish that a particular project's environment will be reproduced successfully.

Fit and tradeoffs

Automatic setup is a reasonable fit when each new worktree needs the same preparation. Actions fit commands that developers want to trigger on demand. This distinction follows directly from the documented execution triggers.

Shared configuration may reduce repeated command entry and setup instructions across a team. That is a practical inference, not a measured productivity result. Projects needing detailed environment guarantees or troubleshooting guidance will need information beyond this page.

Other documented approaches

The page recommends using the integrated terminal directly for one-off debugging and Git operations absent from the app's controls. This provides a documented alternative to defining an action for every command.

It also points to worktrees for isolating concurrent changes from the local checkout. The linked worktree instructions are outside this page, and no comparison with other environment-management tools is supplied.

Source evidence

The evidence consists of the complete Local environments documentation page at [https://learn.chatgpt.com/docs/environments/local-environment.md]. It supports descriptions of intended behavior and configuration examples, without runtime logs, benchmarks or demonstrated project outcomes.

The captured source revision is sha256:be1d914a3e59fb5a17f8b2c8247ff864236d12dc2c50b2b4cc58137a636b6e29. Linked documentation is not part of this source.

Access & freshness

Costs

The page states no price, required subscription tier, usage allowance or charge for local environments. It also provides no execution-cost information for setup scripts or actions. Access costs and total operating costs are unknown from this source.

Sharing and rights

The page explicitly says the generated project configuration can be checked into Git to share with others. This supports configuration sharing as a documented use.

The supplied page contains no documentation license, explicit redistribution terms or broader product usage terms. Those rights are unknown from this source.

Freshness

The source was captured on 2026-11-15 at 00:05:38.937 UTC. The page itself supplies no publication date, last-updated date or applicable app version.

The capture establishes what the documentation stated at that time. Subsequent documentation changes and compatibility with particular app releases are unknown.

Practical next steps

Identify which project commands belong in automatic worktree preparation and which should remain on-demand actions. Use the project's actual installation, build, development-server and test commands when configuring them.

Open the directory containing the shared .codex folder, configure the environment through Codex settings and add platform overrides where required. If sharing with a team, commit the generated configuration to Git.

Before relying on the configuration, verify its behavior in the intended project and operating system. Successful setup, action execution and Git journeys are not established by this documentation.

Evidence for this report

selected-page.txtselected · checked 2026-11-15