Add option to disable preambles

Resolved 💬 2 comments Opened Mar 9, 2026 by kainordherd Closed Apr 18, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI

What feature would you like to see?

The preambles feature is currently enabled by default, and there doesn't appear to be a way to disable it.

It would be great to have an option to turn off the preambles feature.

Additional information

_No response_

View original on GitHub ↗

2 Comments

mvanhorn · 5 months ago

Analysis

I searched the codebase for any existing way to disable preambles - there's none.

Current state: Preamble support is driven by model capability, not user preference. The flow is:

  1. Model metadata signals preamble support
  2. codex-rs/protocol/src/models.rs:241 defines preamble as "Mid-turn assistant text (for example preamble/progress narration)"
  3. codex-rs/tui/src/chatwidget.rs:2656 checks model capability: "Models that don't support preambles only output AgentMessageItems on turn completion"
  4. Preamble text renders inline unconditionally when the model supports it

No config path exists. codex-rs/config/src/config_requirements.rs has no preamble-related fields.

Two implementation approaches

Option A - config.toml field:

disable_preambles = true

Add to ConfigRequirementsToml, thread through to resolved config, gate rendering in chatwidget.rs. Would need just write-config-schema to regenerate the JSON schema.

Option B - /experimental toggle:
Since codex-rs/tui/src/bottom_pane/experimental_features_view.rs already exists as a feature toggle surface, preamble suppression could live there instead of in the config file. This might be more appropriate if the team considers this a niche preference rather than a first-class setting.

Question for maintainers: Which surface makes more sense for this? config.toml, /experimental, or both? Happy to submit a PR for the preferred approach.

etraut-openai contributor · 4 months ago

This feature request hasn't received any upvotes in over a month, so I'm going to close it.