Overview
The Codex agent wraps the OpenAI Codex CLI viaCodexAgentApi. Configure it through Spring properties under agent-client.codex.*.
Configuration Properties
Prefix:agent-client.codex
| Property | Type | Default | Description |
|---|---|---|---|
mode | AgentClientMode | β | Controls default permissiveness. Inherits from agent-client.mode if not set (default: LOOSE). |
model | String | gpt-5-codex | Model to use for Codex execution |
timeout | Duration | 5m | Timeout for agent task execution |
full-auto | boolean | true | Enable full-auto mode (workspace-write sandbox + never approval) |
skip-git-check | Boolean | β | Skip git repository check. When not explicitly set, derived from mode (see below). |
reasoning-effort | String | β | Model reasoning effort (model_reasoning_effort config override): minimal, low, medium, high, xhigh. Overrides the portable effort when both are set |
executable-path | String | β | Path to the Codex CLI executable (auto-discovered if not set) |
skipGitCheck and Mode Interaction
Theskip-git-check property has special behavior β its effective value depends on AgentClientMode when not explicitly set:
skip-git-check | mode | Effective Value | Behavior |
|---|---|---|---|
true (explicit) | any | true | Works in any directory |
false (explicit) | any | false | Requires git repository |
| not set | LOOSE (default) | true | Works in any directory |
| not set | STRICT | false | Requires git repository |
Explicit always wins. Setting
skip-git-check directly always overrides the mode-derived value. See Defaults Philosophy for the precedence rationale.Why This Matters
Codex is the only provider that blocks execution in non-git directories by default. WithoutskipGitCheck=true, attempting to create a file in a temporary directory fails:
LOOSE mode (default) automatically resolves this, so users can start with Codex without hitting this wall.
Full-Auto Mode
Whenfull-auto=true (default), Codex runs with:
- Workspace-write sandbox β can write files in the working directory
- Never asks for approval β autonomous execution
The Codex CLI
exec subcommand does not support --ask-for-approval. Only --full-auto and --sandbox control execution behavior.Authentication
OPENAI_API_KEY environment variable.