You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose Codex CLI feature flags through the SDK so consumers can enable or disable experimental and optional capabilities without relying on magic string literals.
Scope
In scope
CodexFeatureFlags constants class mirroring the features block from codex-rs/core/config.schema.json
ThreadOptions.EnabledFeatures / ThreadOptions.DisabledFeatures accepting these constants
CodexExecArgs.EnabledFeatures / CodexExecArgs.DisabledFeatures for low-level exec control
Out of scope
Deciding which flags to enable at runtime (consumer responsibility)
Feature flag semantics (controlled entirely by the Codex CLI)
Business Rules
Feature flag identifiers must match the Codex CLI's config.schema.json exactly; never invent new names.
SDK ships constants for every known flag at the pinned submodule commit so consumers have compile-time safety.
New flags added by upstream syncs must be added to CodexFeatureFlags in the same PR that updates the submodule.
Raw string literals for feature flags are not permitted in SDK production code or tests; always use CodexFeatureFlags constants.
Usage
usingManagedCode.CodexSharpSDK.Models;varthread=client.StartThread(newThreadOptions{// Enable guardian approval and request-permissions tool (added in upstream sync 06f82c1)EnabledFeatures=[CodexFeatureFlags.GuardianApproval,CodexFeatureFlags.RequestPermissionsTool,],// Disable MCP elicitationDisabledFeatures=[CodexFeatureFlags.ToolCallMcpElicitation,],});
Known Feature Flags
Sourced from submodules/openai-codex/codex-rs/core/config.schema.json at pinned commit.
Feature flags are kept in sync with the pinned submodules/openai-codex submodule.
When the submodule is updated, compare codex-rs/core/config.schema.json.properties.features.properties against CodexFeatureFlags and add any new entries.
Flags added by upstream sync 6638558b88 → 06f82c123c (2026-03-08):
guardian_approval — guardian approval MVP
request_permissions_tool — request permissions as a tool call
tool_call_mcp_elicitation — MCP-style elicitation for tool-call approvals
Definition of Done
CodexFeatureFlags constants match all features entries in pinned config.schema.json.
Tests in CodexExecTests use CodexFeatureFlags constants (no raw string literals).