[Bug]: Follow-ups queue instead of steering during automatic compaction#24137

opened5d agobyNNikitaMGrimm

Note

🤖 Claude Opus 5.5 writing on behalf of NikitaMGrimm

Area

apps/web (also apps/mobile)

Steps to reproduce

  1. Settings → General → Follow-up behavior: Steer.
  2. Start a Codex or Claude turn that runs long enough for the provider to compact context automatically. (Reproduced with Codex by setting model_auto_compact_token_limit = 6000 in an isolated CODEX_HOME. Asking for five separate echo commands compacts after each step.)
  3. While the timeline shows Compacting context, type a follow-up and send it.

Expected behavior

The follow-up steers the running turn, as it does at any other point in that turn. Only an explicit /compact run should force follow-ups into the queue, because providers refuse steering into a dedicated compact turn.

Actual behavior

During automatic compaction the send button changes to Queue message. The follow-up becomes a separate queued turn. It stays queued after compaction finishes and the original turn keeps working, until that turn ends or the user promotes it to Steer by hand.

The cause is in the clients. Since #15631, isCompacting is also true for a running automatic-compaction item, and ChatComposer passes canSteer: !isCompacting to resolveComposerDispatchMode. That returns queue regardless of the Steer preference. Mobile does the same through canSteerActiveTurn. The code comment says "A compacting turn cannot take steering input", which holds only for explicit /compact:

  • The server already allows steering here. CommandPolicy.resolveMessageDispatchIntent downgrades a steer only when the target run is /compact or /logout.
  • Codex CLI 0.163.0 accepted turn/steer sent at the moment a mid-turn contextCompaction item started. The input was delivered once into the same turn, and the final reply followed it. (Its only compaction refusal, "cannot steer a compact turn", applies to dedicated compact turns.)
  • Claude Code 2.1.308 handled a priority: "now" message sent during status: compacting like any other steer. It aborted the in-flight compaction (terminal_reason=aborted_streaming, which ClaudeAdapterV2 already treats as a steered segment), compacted again, finished the original task, and followed the steer.
  • Before #15631, which aimed to display automatic compaction, steering during it was allowed. That PR notes the queueing as a side effect.

Impact

Major degradation or frequent failure. Automatic compaction often coincides with long turns, which is when users steer. A steer silently becoming a queued turn means the agent keeps working without the correction.

Version or commit

Observed on 0.1.2-nightly.20261022.1792682989189. Reproduced on main @ eb1510d2493c.

Environment

Windows desktop (original incident, Codex). Reproduced on Linux with the web client served from source.

Logs or stack traces

Original incident, from the thread's projection records and provider log (UTC):

text
113:17:48 automatic compaction item started in the running Codex turn
213:19:59 follow-up recorded as a queued run (Follow-up behavior = Steer)
313:20:41 compaction completed; follow-up still queued, turn still running
413:22:24 follow-up promoted to Steer by hand; T3 sent turn/steer, Codex accepted it

Screenshots

During automatic compaction the send button reads Queue message despite the Steer preference

After compaction finishes the follow-up is still queued while the turn keeps working