Codex CLI
Codex CLI is OpenAI’s official command-line agent. Agentslan dispatches it via
codex exec, piping prompts on stdin, with a per-company managed
CODEX_HOME so each company’s auth and skills stay isolated.
The adapter type inside Agentslan is codex_local and the menu label is
Codex (local).
Install Codex CLI on the host
Section titled “Install Codex CLI on the host”Install the CLI globally and verify it’s on your PATH:
npm install -g @openai/codexcodex --versionIf codex is installed at a non-standard path, point the adapter’s command
field at the full path.
Sign in to OpenAI on the host
Section titled “Sign in to OpenAI on the host”Run codex once to complete the OAuth flow; credentials are then cached on
disk and headless runs work without prompts:
codexYou can also use an API key by exporting OPENAI_API_KEY in the host
environment or through the adapter’s env map.
Add the agent in Agentslan
Section titled “Add the agent in Agentslan”- Open the Agentslan desktop app.
- Go to Agents → Add agent.
- Pick Codex (local) as the adapter type.
- Set a model. Built-in options:
gpt-5.4gpt-5.3-codex(default)gpt-5.3-codex-sparkgpt-5o3,o4-mini,o3-minigpt-5-mini,gpt-5-nanocodex-mini-latest
- Save.
Configuration reference
Section titled “Configuration reference”| Field | Type | Notes |
|---|---|---|
cwd | string, optional | Default absolute working directory for the agent process. |
instructionsFilePath | string, optional | Absolute path to a Markdown instructions file. Contents are prepended to the stdin prompt on every run. |
model | string, optional | Codex model ID. Defaults to gpt-5.3-codex. |
modelReasoningEffort | string, optional | Reasoning effort override (minimal, low, medium, high, xhigh), passed via -c model_reasoning_effort=.... Some model/tool combinations reject specific levels (e.g. minimal with web search). |
promptTemplate | string, optional | Run prompt template. |
search | boolean, optional | Run with --search. |
fastMode | boolean, optional | Enable Codex Fast mode. Only supported on gpt-5.4 and consumes credits faster. When enabled, Agentslan applies service_tier="fast" and features.fast_mode=true. |
dangerouslyBypassApprovalsAndSandbox | boolean, optional | Run with the bypass flag (defaults true). |
command | string, optional | Defaults to codex. |
extraArgs | string[], optional | Additional CLI arguments. |
env | object, optional | Extra environment variables. |
workspaceStrategy | object, optional | Currently supports { type: "git_worktree", baseRef?, branchTemplate?, worktreeParentDir? }. |
timeoutSec | number, optional | Run timeout in seconds. |
graceSec | number, optional | SIGTERM grace period before SIGKILL. |
- Prompts are piped to Codex via stdin; Codex receives
-as the prompt argument. - If
instructionsFilePathis configured, Agentslan prepends its contents to the stdin prompt for every run. codex execautomatically applies repo-scopedAGENTS.mdinstructions from the active workspace. Agentslan cannot suppress that discovery, so repoAGENTS.mdfiles apply on top of any explicitinstructionsFilePath.- Agentslan injects per-company skills into the effective
CODEX_HOME/skills/at execution time so Codex can discover them without polluting the project working directory. - Unless
CODEX_HOMEis overridden in the adapter config, Agentslan runs Codex with a per-company managedCODEX_HOMEand seeds auth from your shared Codex home (CODEX_HOMEenv var, when set, otherwise~/.codex).