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