addDirsstring[]
Additional writable directories beyond workspace (e.g., ["/tmp", "/var/log"]). Useful for monorepos and multi-directory projects.
approvalenum
Deprecated alias for approvalPolicy — both map to --ask-for-approval. Prefer approvalPolicy. Values: on-request, never
approvalPolicyenum
Approval: never, on-request
bypassHookTrustboolean
DANGEROUS: run enabled hooks without persisted hook trust
cdstring
Working directory
changeModeboolean
Return structured OLD/NEW edits for refactoring
chunkCacheKeystring
Cache key for continuation
chunkIndexnumber
Chunk index (1-based)
configstring | object
Configuration overrides as 'key=value' string or object
disableFeaturesstring[]
Disable feature flags (repeatable). Equivalent to -c features.<name>=false
enableFeaturesstring[]
Enable feature flags (repeatable). Equivalent to -c features.<name>=true
ephemeralboolean
Run without persisting Codex session files to disk
fullAutoboolean
Compatibility alias for workspace-write with approval=never (not --yolo)
ignoreRulesboolean
Ignore user and project execpolicy .rules files for this run
ignoreUserConfigboolean
Ignore $CODEX_HOME/config.toml for this run; authentication is still loaded
imagestring | string[]
Optional image file path(s) to include with the prompt
includeMetadataboolean
Include configuration metadata in response
includeThinkingboolean
Include reasoning/thinking section in response
localProviderenum
Specify which local provider to use (lmstudio or ollama). Automatically enables --oss if not set. If omitted with --oss, uses config default or shows selection.
modelstring
Optional model override. Known: gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4-mini. If omitted, uses your Codex CLI default (~/.codex/config.toml). Specify only to override.
ossboolean
Use local Ollama server (convenience for -c model_provider=oss). Requires Ollama running locally. Automatically sets sandbox to workspace-write if not specified.
outputLastMessagestring
Write final Codex message to file path. Useful for CI/CD result capture (Codex CLI v0.95.0+)
outputSchemastring | object
JSON Schema path or inline schema to constrain output format (Codex CLI v0.95.0+)
personalityenum
Communication style: pragmatic (concise, machine-friendly) or friendly (conversational). Codex CLI v0.94.0+
profilestring
Configuration profile to use from ~/.codex/config.toml
promptstringобязательный
Task or question. Use @ to include files (e.g., '@largefile.ts explain').
reasoningEffortenum
Reasoning depth. Omit to use the CLI default. max/ultra are model-dependent GPT-6/GPT-5.6 options; ultra may delegate to subagents.
resetSessionboolean
Clear session context before execution. Starts fresh conversation.
responseModeenum
Response verbosity: "clean" returns only the final answer (default), "full" returns the complete execution log including thinking, tool calls, and agent activity
sandboxboolean
Quick automation mode: enables workspace-write with approval=never. Sandboxing remains active.
sandboxModeenum
Access: read-only, workspace-write, danger-full-access
searchboolean
Enable web search using native --search flag (v0.52.0+). Requires network access - automatically sets sandbox to workspace-write if not specified.
sessionIdstring
Session ID for conversation continuity. Enables native Codex resume.
skipGitRepoCheckboolean
Skip git repository validation. Useful for non-git directories (Codex CLI v0.75.0+)
strictConfigboolean
Fail when config.toml contains fields unknown to the installed Codex CLI
timeoutnumber
Maximum execution time in milliseconds (optional)
toolOutputTokenLimitnumber
Maximum tokens for tool outputs (100-10,000). Controls response verbosity.
workingDirstring
Working directory for execution
yoloboolean
⚠️ Bypass all safety (dangerous)