Per-project environment profiles with automatic Windows/WSL switching
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:
- Per-project environment profiles
- Automatic environment switching
- Environment-scoped Custom Instructions
- Concurrent multi-environment agent support
- 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_