description: Configure your preferred package manager (npm/pnpm/yarn/bun) disable-model-invocation: true
Package Manager Setup
Native Subagent Protocol (Codex)
Codex supports native subagents. Delegate with spawn_agent, coordinate with send_input, collect via wait_agent, and clean up with close_agent.
Execution preference:
- Use native subagents first for independent workstreams (parallel when possible).
- Merge results in main thread and run final verification.
- Fallback only when delegation is blocked: use the
[ANALYST]/[ARCHITECT]/[EXECUTOR]/[REVIEWER]structure in a single response.
Minimal orchestration pattern:
spawn_agent -> send_input (optional) -> wait_agent -> close_agent
Configure your preferred package manager for this project or globally.
Usage
If scripts/setup-package-manager.js exists in the repo, use it. Otherwise, configure manually via the files below.
# Detect current package manager
node scripts/setup-package-manager.js --detect
# Set global preference
node scripts/setup-package-manager.js --global pnpm
# Set project preference
node scripts/setup-package-manager.js --project bun
# List available package managers
node scripts/setup-package-manager.js --list
Detection Priority
When determining which package manager to use, the following order is checked:
- Environment variable:
CODEX_PACKAGE_MANAGER - Project config:
.codex/package-manager.json - package.json:
packageManagerfield - Lock file: Presence of package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb
- Global config:
~/.codex/package-manager.json - Fallback: First available package manager (pnpm > bun > yarn > npm)
Configuration Files
Global Configuration
// ~/.codex/package-manager.json
{
"packageManager": "pnpm"
}
Project Configuration
// .codex/package-manager.json
{
"packageManager": "bun"
}
package.json
{
"packageManager": "pnpm@8.6.0"
}
Environment Variable
Set CODEX_PACKAGE_MANAGER to override all other detection methods:
# Windows (PowerShell)
$env:CODEX_PACKAGE_MANAGER = "pnpm"
# macOS/Linux
export CODEX_PACKAGE_MANAGER=pnpm
Run the Detection
To see current package manager detection results, run:
node scripts/setup-package-manager.js --detect