CodexChatOptions class
Options for configuring a Codex chat session.
Only Codex specific flags that need to be passed to the CLI are handled here.
- Inheritance
-
- Object
- CliChatOptions
- CodexChatOptions
Constructors
-
CodexChatOptions({int? maxTurns, String? mode, String? profile, String? resumeSessionId, Map<
String, String> ? environment, bool? outputJson, bool? quiet, bool? continueLastSession, bool? enableMcp, String? sandboxMode, String? approvalPolicy, List<String> ? allowedDirectories, String? configPath, List<String> ? additionalArgs, String? reasoningEffort, String? systemPrompt, String? model, String? cwd}) -
const
Properties
-
additionalArgs
→ List<
String> ? -
Additional command line arguments passed verbatim to Codex CLI.
final
-
allowedDirectories
→ List<
String> ? -
List of allowed directories for file operations.
final
- approvalPolicy → String?
-
Approval policy for Codex actions (e.g. 'never', 'on-request').
final
- configPath → String?
-
Custom configuration file path.
final
- continueLastSession → bool?
-
Whether to continue the last session.
final
- cwd → String?
-
Working directory for file operations
finalinherited
- enableMcp → bool?
-
Whether to include MCP servers.
final
-
environment
→ Map<
String, String> ? -
Custom environment variables.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxTurns → int?
-
Maximum number of turns in the conversation.
final
- mode → String?
-
Operation mode ('suggest', 'auto-edit', 'full-auto').
final
- model → String?
-
Model to use (e.g., 'gpt-5', 'codex-mini-latest')
finalinherited
- outputJson → bool?
-
Whether to output in JSON format.
final
- profile → String?
-
Profile to use from config.toml.
final
- quiet → bool?
-
Whether to run in quiet mode (non-interactive with JSON output).
final
- reasoningEffort → String?
-
Reasoning effort level ('minimal', 'medium', 'high').
Controls the depth of reasoning for the model.
final
- resumeSessionId → String?
-
Session ID to resume a previous conversation.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sandboxMode → String?
-
Sandbox mode to run Codex under (e.g. 'workspace-write', 'danger-full-access').
final
- systemPrompt → String?
-
System prompt to set the context for Codex
finalinherited
- timeout → Duration
-
Max Timeout to run the cli
finalinherited
Methods
-
copyWith(
{int? maxTurns, String? mode, String? profile, String? resumeSessionId, Map< String, String> ? environment, bool? outputJson, bool? quiet, bool? continueLastSession, bool? enableMcp, String? sandboxMode, String? approvalPolicy, List<String> ? allowedDirectories, String? configPath, List<String> ? additionalArgs, String? reasoningEffort, String? systemPrompt, String? model, String? cwd}) → CodexChatOptions - Creates a copy of options with updated values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCliArgs(
) → List< String> - Converts the options into command line arguments that are handed to the Codex CLI.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited