codex - 💡(How to fix) Fix Allow compaction-specific reasoning effort and service tier

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

model_reasoning_effort = "high"
service_tier = "default"

compact_model_reasoning_effort = "low"
compact_service_tier = "fast"

---

cargo fmt --check
env CARGO_HOME=/private/tmp/codex-cargo-home cargo test -p codex-core config_toml_compact_
env CARGO_HOME=/private/tmp/codex-cargo-home cargo test -p codex-core remote_manual_compact_uses_compact_specific_service_tier_and_reasoning_effort
RAW_BUFFERClick to expand / collapse

Proposal

Allow compaction requests to use a separate reasoning effort and service tier from normal turns.

Suggested config shape:

model_reasoning_effort = "high"
service_tier = "default"

compact_model_reasoning_effort = "low"
compact_service_tier = "fast"

This lets normal interactive turns keep their usual quality/cost profile, while auto/manual compaction can opt into a faster and lower-reasoning request path.

Motivation

Long-running sessions can become unusable when compaction itself is slow or times out. In local testing, using fast mode for compact substantially reduced compact stalls, but setting global service_tier = "fast" changes the behavior of every normal turn too.

The current config surface appears to make compact inherit the session-level model_reasoning_effort and service_tier. That is convenient as a default, but it prevents users from making compaction cheaper/faster without also changing day-to-day model behavior.

Prepared implementation

I prepared a branch here:

https://github.com/Cccceb/codex/tree/compact-specific-reasoning-service-tier

Commit:

https://github.com/Cccceb/codex/commit/64b6b1e00ad40558c9e4d78c4a6d17b4d01f3b7a

Summary of the change:

  • add optional compact_service_tier and compact_model_reasoning_effort config fields
  • use those compact-specific settings for local compact, legacy remote compact, and remote compaction v2
  • keep existing behavior unchanged when the compact-specific fields are unset
  • normalize compact_service_tier = "fast" through the same fast-mode service-tier normalization path as regular service_tier

Touched areas:

  • codex-rs/config/src/config_toml.rs
  • codex-rs/core/config.schema.json
  • codex-rs/core/src/compact.rs
  • codex-rs/core/src/compact_remote.rs
  • codex-rs/core/src/compact_remote_v2.rs
  • codex-rs/core/src/config/mod.rs
  • config and remote compact tests

Testing

Ran locally:

cargo fmt --check
env CARGO_HOME=/private/tmp/codex-cargo-home cargo test -p codex-core config_toml_compact_
env CARGO_HOME=/private/tmp/codex-cargo-home cargo test -p codex-core remote_manual_compact_uses_compact_specific_service_tier_and_reasoning_effort

All passed.

I attempted to open this as a PR, but this repository currently restricts pull request creation to collaborators, so I am filing the proposal and implementation details here instead.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Allow compaction-specific reasoning effort and service tier