Model-controlled per-turn reasoning retention to reduce long-session context cost

Open 💬 0 comments Opened Aug 21, 2026 by Yi-frank-phy

What variant of Codex are you using?

App

What feature would you like to see?

GPT-5.6's persisted all_turns reasoning is very useful for long-horizon Codex work because it can preserve useful mental state across turns instead of repeatedly reconstructing the same understanding.

However, retaining reasoning from every completed turn can also become expensive in long sessions. Many turns contain reasoning that is only transiently useful: routine tool planning, deciding which file to inspect next, reasoning around an already-resolved test failure, or exploration whose conclusion is already reflected in the repository state.

For ChatGPT-auth Codex / Responses Lite, simply switching to reasoning.context = "current_turn" does not appear to be available, since Responses Lite currently requires reasoning.context = "all_turns" (#33496).

Proposal

Could Codex support model-controlled per-turn retention of persisted reasoning while continuing to use reasoning.context = "all_turns" at the protocol level?

After each completed turn, the model could mark that turn's opaque reasoning state as either:

  • retain — keep it available in future active context
  • discard — stop carrying that completed turn's reasoning into future turns

The reasoning should remain opaque/encrypted. This would only control whether an existing reasoning item remains in active context; it would not expose or edit chain-of-thought.

Importantly, this should not require an additional model call. The active model could make the retention decision as part of the turn it is already completing.

Desired UX

Ideally this could be exposed as one setting:

reasoning_retention = "model"

with the current behavior remaining available as:

reasoning_retention = "all"

The user should not need to manage summaries, hooks, memory files, or a separate context-management system.

Why model-controlled retention?

There seems to be a useful middle ground between:

  1. preserving reasoning from every turn indefinitely; and
  2. disabling cross-turn reasoning entirely.

Some reasoning is genuinely valuable across turns:

  • an unresolved hypothesis
  • a mental model of an unfamiliar subsystem
  • a non-obvious invariant
  • the reason an apparently plausible approach was rejected

Other reasoning becomes nearly useless after the turn completes:

  • choosing the next grep/read operation
  • routine tool orchestration
  • reasoning around a resolved test failure
  • exploration whose result has already been committed to the filesystem or final answer

The model that just produced the reasoning is probably in the best position to distinguish these cases.

This could retain one of the main advantages of GPT-5.6 all_turns reasoning — avoiding repeated exploration — while reducing repeated input-token cost as sessions become long.

Motivation from current behavior

#33496 shows that Responses Lite currently requires reasoning.context = "all_turns".

#39767 also demonstrates that accumulated historical reasoning can become a meaningful part of long-session context/token accounting for GPT-5.6.

Those are separate issues, but together they make selective reasoning retention potentially useful as an efficiency control.

Non-goals

This request is not asking for:

  • access to raw chain-of-thought
  • editable reasoning content
  • a new summarization or compaction system
  • selective tool-call history retention
  • a user-managed memory hierarchy
  • removing the Responses Lite all_turns requirement

The request is deliberately narrow: allow the model to decide whether each completed turn's existing opaque reasoning state remains in future active context.

Additional information

_No response_

View original on GitHub ↗