codex - 💡(How to fix) Fix Per-project environment profiles with automatic Windows/WSL switching

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Modern engineering workflows are heterogeneous.

Developers frequently combine:

  • Linux containers
  • Windows-native tooling
  • Docker
  • browser automation
  • WSL
  • remote infrastructure
  • CI/CD environments

Codex is evolving into a long-running autonomous engineering platform, and environment-specific behavior is essential for reducing friction and enabling reliable autonomous workflows.

Without this functionality, users must constantly:

  • rewrite prompts
  • change settings
  • restart Codex
  • manually re-orient the agent
  • duplicate instruction sets

This breaks flow and limits Codex's effectiveness as a persistent engineering assistant.

Code Example

environment: wsl-laravel

---

environment: windows-native
RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

App for Windows

What feature would you like to see?

Problem

Currently Codex on Windows uses a single global execution environment:

  • Windows native
  • WSL

Switching between them requires:

  • opening Settings
  • changing the environment
  • restarting Codex

This creates major friction for developers working across mixed stacks and heterogeneous environments.

Additionally, Custom Instructions are currently global and cannot be scoped to a specific execution environment or project type.

This becomes problematic when workflows differ significantly between:

  • Windows-native projects
  • WSL/Linux projects
  • Docker-first repositories
  • Remote/SSH infrastructure environments
  • GUI/browser automation projects

Proposed Solution

Introduce:

  1. Per-project environment profiles
  2. Automatic environment switching
  3. Environment-scoped Custom Instructions
  4. Concurrent multi-environment agent support
  5. No restart requirement when switching environments

Example Workflow

Project A (Laravel / Docker / Linux)

Environment:

  • WSL
  • bash
  • Docker-first workflow

Custom Instructions:

  • Run backend commands inside containers
  • Use Linux paths
  • Prefer bash tooling
  • Use Playwright from WSL

Project B (.NET / Electron / Windows)

Environment:

  • Windows native
  • PowerShell

Custom Instructions:

  • Prefer Windows-native tooling
  • Use Chrome integration
  • Use Windows filesystem paths
  • Avoid WSL unless explicitly requested

Codex should automatically activate the correct environment profile when opening the project.

Suggested Implementation

Environment Profiles

Settings → Environments

Each profile could contain:

  • execution backend
  • shell
  • filesystem root
  • browser automation settings
  • Docker strategy
  • tool preferences
  • scoped Custom Instructions

Project Binding

Projects can bind to profiles using:

  • AGENTS.md
  • .codex/config
  • workspace metadata
  • repository settings

Example:

environment: wsl-laravel

or:

environment: windows-native

Additional Improvements

Concurrent Multi-Environment Sessions

Allow multiple Codex chats/agents to run simultaneously in different environments:

  • Chat A → WSL
  • Chat B → Windows native
  • Chat C → remote SSH host

without requiring global switching or restart.

Environment Awareness APIs

Expose current environment metadata to the agent:

  • shell
  • OS
  • containerization mode
  • filesystem type
  • Docker availability
  • browser integration support

This would significantly improve autonomous behavior.

Why This Matters

Modern engineering workflows are heterogeneous.

Developers frequently combine:

  • Linux containers
  • Windows-native tooling
  • Docker
  • browser automation
  • WSL
  • remote infrastructure
  • CI/CD environments

Codex is evolving into a long-running autonomous engineering platform, and environment-specific behavior is essential for reducing friction and enabling reliable autonomous workflows.

Without this functionality, users must constantly:

  • rewrite prompts
  • change settings
  • restart Codex
  • manually re-orient the agent
  • duplicate instruction sets

This breaks flow and limits Codex's effectiveness as a persistent engineering assistant.

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Per-project environment profiles with automatic Windows/WSL switching