Skip to content

[Bug] Native Codex session config normalization incorrectly clamps max and ultra reasoning effort to xhigh #5360

Description

@pg-adm1n

Describe the bug

When starting a native Codex session (codex-native harness, e.g. via omnigent codex or sub-agent dispatches), Omnigent creates a private session CODEX_HOME and copies the user's config.toml via _populate_codex_home_config.

During this copy, _normalize_copied_codex_effort() in omnigent/inner/codex_executor.py normalizes top-level model_reasoning_effort. However, it checks against CODEX_EFFORTS (the in-process OpenAI Responses API ladder, which tops out at xhigh), rather than CODEX_NATIVE_EFFORTS (which includes max and ultra).

As a result, any native Codex session with model_reasoning_effort = "max" or "ultra" in ~/.codex/config.toml (or configured on native models such as gpt-5.6-luna or sol) has its reasoning effort silently downgraded to xhigh in the per-session config.toml.

Reproduction steps

  1. In ~/.codex/config.toml, configure model_reasoning_effort = "max" (or "ultra").
  2. Launch a native Codex session (codex-native harness), for example with gpt-5.6-luna.
  3. Inspect the per-session config in ~/.omnigent/codex-native/<session>/codex-home/config.toml.
  4. Observe that model_reasoning_effort has been rewritten to "xhigh".

Expected behavior

Native Codex sessions should preserve max and ultra reasoning effort in their session config.toml because codex-native drives the real Codex CLI process which validates and supports CODEX_NATIVE_EFFORTS. In-process Responses API sessions can continue normalizing against CODEX_EFFORTS.

Environment

  • Platform: macOS / Linux
  • Omnigent version: 0.11.0.dev0 (main)
  • Harness: codex-native

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingP2-mediumPriority: bug with workaround, important feature requestcomp:harness-t1Highest-usage harnesseshelp wantedExtra attention is neededtriagedIssue has been triaged by the bot

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions