Skip to content

[codex] Use managed defaults for TUI threads - #30147

Merged
hefuc-oai merged 3 commits into
mainfrom
codex/tui-managed-new-thread-defaults
Jun 26, 2026
Merged

[codex] Use managed defaults for TUI threads#30147
hefuc-oai merged 3 commits into
mainfrom
codex/tui-managed-new-thread-defaults

Conversation

@hefuc-oai

Copy link
Copy Markdown
Contributor

Why

#29683 exposes managed defaults for new-thread model settings through configRequirements/read without applying them server-wide. The TUI is an app-server client, so it should explicitly consume those defaults when it creates a fresh thread.

This lets plain codex start on the managed model while preserving the existing ability to change model settings within the thread.

What changed

  • Read requirements.models.newThread during TUI app-server bootstrap.
  • Apply the managed model, reasoning effort, and service tier to the initial fresh thread and subsequent /new or /clear threads.
  • Keep explicit launch overrides above the managed defaults.
  • Normalize the managed fast service tier to the priority request value.
  • Leave resumed and forked threads unchanged.

The application logic lives in a small TUI-only module; app-server thread/start behavior remains unchanged for other clients.

User experience

  • Plain codex starts with the managed new-thread settings.
  • A user can still change settings with /model or the existing service-tier controls.
  • Starting another fresh thread reapplies the managed defaults.
  • Explicit launch choices such as codex -m <model> continue to win.

Validation

  • just test -p codex-tui managed_new_thread_defaults
  • just fix -p codex-tui

Depends on #29683.

@hefuc-oai
hefuc-oai force-pushed the codex/managed-new-thread-model-default branch from 0f3877f to 0f2bf04 Compare June 26, 2026 16:56
@hefuc-oai
hefuc-oai marked this pull request as ready for review June 26, 2026 17:00
@hefuc-oai
hefuc-oai requested a review from a team as a code owner June 26, 2026 17:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de37c67a42

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/managed_new_thread_defaults.rs Outdated
Comment thread codex-rs/tui/src/app/session_lifecycle.rs
Comment thread codex-rs/tui/src/managed_new_thread_defaults.rs Outdated
@hefuc-oai
hefuc-oai force-pushed the codex/tui-managed-new-thread-defaults branch from dc0b22f to 7f99709 Compare June 26, 2026 17:39
@hefuc-oai
hefuc-oai force-pushed the codex/managed-new-thread-model-default branch from 0f2bf04 to 4356bf6 Compare June 26, 2026 18:25
Base automatically changed from codex/managed-new-thread-model-default to main June 26, 2026 18:37
@hefuc-oai
hefuc-oai force-pushed the codex/tui-managed-new-thread-defaults branch from 7f99709 to 4bc32d2 Compare June 26, 2026 18:53
@hefuc-oai
hefuc-oai enabled auto-merge (squash) June 26, 2026 19:25
@hefuc-oai
hefuc-oai merged commit cf36c68 into main Jun 26, 2026
45 of 47 checks passed
@hefuc-oai
hefuc-oai deleted the codex/tui-managed-new-thread-defaults branch June 26, 2026 19:27
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants