[Bug]: Claude steers abort automatic context compaction #25796
Before submitting#
- I searched existing issues and did not find a duplicate of this Claude adapter failure.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
- Run a long Claude thread that receives messages from other threads through
t3_thread_sendwithmode: "steer". - Let the receiving thread reach automatic context compaction.
- Send a steer while its timeline shows "Compacting context". Repeat while compaction is running.
I also reproduced the failure directly with @anthropic-ai/claude-agent-sdk 0.3.276 and Claude Code 2.1.310: offer a user message with priority: "now" when the output stream reports system/status: compacting. The synthetic reproduction used Sonnet 5.5 and a lowered automatic-compaction threshold.
Expected behavior#
Hold steers while automatic compaction is running. Once compaction finishes and the opening prompt is ready, deliver waiting messages together, in order, to the same active T3 turn rather than waiting for that entire turn to finish. Explicit Stop should still cancel undelivered input.
Please confirm this intended behavior during triage. The proposed fix also needs to preserve message outcomes and delegated-delivery acknowledgments when the turn stops or is replaced.
Actual behavior#
ClaudeAdapterV2.steerTurn offers the message immediately with priority: "now". Claude aborts compaction, returns an aborted_streaming segment, and starts compacting again. Frequent reports to a coordinator can repeatedly restart compaction.
In one observed thread, 11 compactions ended with aborted, each 39–94 ms after a steer arrived. Other independent compaction/server failures also occurred; this report does not attribute those failures to steering.
Impact#
Major degradation or frequent failure
Version or commit#
T3 Code 0.1.3-nightly.20261024.3643; Claude Code 2.1.310; Agent SDK 0.3.276.
Environment#
macOS 27.0, T3 Code desktop Nightly, Claude provider.
Logs or stack traces#
Minimal synthetic reproduction, with message contents and identifiers omitted:
status {"status":"compacting"}
OFFER priority=now
status {"status":null,"compact_result":"failed","compact_error":"aborted"} // 6 ms later
RESULT {"subtype":"success","terminal_reason":"aborted_streaming"}
status {"status":"compacting"} // starts over
Workaround#
Avoid steering while compaction is running. Queueing avoids this interruption but delays the input until the entire active turn ends, so it does not provide the expected in-turn steering behavior.
Related#
- #24137 describes composer follow-ups being queued during automatic compaction; #24138 changes that client behavior. This report concerns the Claude server-side delivery path, already reachable through MCP.
- #22552 addresses steers overtaking the opening prompt, a related delivery boundary.
- #24842 concerns request/compaction phases that never progress. A general watchdog is outside this report.
Also hitting this on T3 Code
0.1.7-nightly.20261103.4138(desktop app, Linux x64) with Claude Code2.1.318and Opus 5.5.Four automatic compactions were aborted in about 50 minutes, across three threads. Each ended with
compact_result: "failed",compact_error: "aborted"4–18 ms after an outgoingprompt.offerwithpriority: "now":Time until abort Summary chars discarded Delay from abort to successful retry 0.3 s 0 110 s 32 s 7,839 120 s 60 s 13,615 still running when checked 91 s 27,199 183 s 01:12:34.106 status compacting 01:12:34.381 OUT prompt.offer priority=now 01:12:34.399 status compact_result=failed compact_error=aborted 01:12:34.416 result subtype=success stop_reason=tool_use 01:12:34.475 status compacting (restart) 01:14:24.486 status compact_result=successThe steered messages were delivered: each appears in the Claude session transcript as a user message right after the abort. The compactions started at about 370k tokens.
steerTurninClaudeAdapterV2.tsonmainstill setspriority: "now", with no compaction check that I could find.This setup has T3 threads steering each other, which makes these collisions likely. +1 to the proposed behaviour: a steer that arrives during compaction should wait until compaction finishes, then be delivered into the same turn.
Investigated and written by Claude Opus 5.5 in Claude Code, via T3 Code triage.
tanstack-source added labelsbug
Also hit on
0.1.11-nightly.20261117.4838(desktop app, macOS arm64, Claude provider, Follow-up behavior: Steer). Today's nightly has only the "hold" half of the expected behavior. The "deliver after compaction" half is missing on the client side, so a follow-up stays queued for the rest of the turn.What happened
- 21:24:51 automatic compaction starts in a long-running Claude turn
- 21:25:09 the user sends a follow-up from the web composer. It becomes a separate queued run (
queue_after_active) instead of a steer - 21:26:22 compaction completes and the turn keeps working, but the follow-up stays queued
- 21:27:32 the user promotes it by hand (
inputIntent: promoted_queued_to_steer). Without that it would have waited for the whole turn, which was still running about 30 minutes later
Steers sent outside compaction in the same turn were delivered normally.
Why
compactionBlocksSteering(packages/client-runtime/src/state/composerDispatch.ts) forces"queue"during automatic compaction unless the provider session reportscapabilities.turns.activeSteeringDuringCompaction. OnlyCodexAdapterV2sets it (#24138), so the fix for #24137 covers Codex only.- Nothing promotes the queued follow-up into the active turn after compaction completes.
- #25848 holds steers in
ClaudeAdapterV2during compaction, but it does not setactiveSteeringDuringCompaction: truefor Claude. With only that PR, the composer would still queue instead of steering, and this symptom would remain. Setting the capability for Claude in that PR, or promoting queued follow-ups when compaction ends, would cover it.
Repro
- Claude thread, Follow-up behavior = Steer
- Let a long turn reach automatic compaction ("Compacting…" visible)
- Send a follow-up from the composer while it compacts
- After compaction completes, the follow-up is still in the queue and the agent never sees it until the turn ends or you promote it by hand
Triage by Claude Opus 5.5 (Claude Code agent) via T3 Code triage.
DeclanDarcy(GitHub profile, opens in a new tab) linked this to #38723
Observed a similar pattern on Linux (CachyOS; local T3 CLI reports v0.1.10) in a long Claude Agent thread: three consecutive “Context compaction failed · aborted” entries, interleaved with inbound messages from other threads marked Steer, followed by a successful compaction (801K → 28.7K displayed). This is an observation, not a controlled reproduction or proof of causality. In a separate sequence the same thread also showed HTTP 429 / “Usage limit reached” around an Opus → GPT native model switch; I have not established a connection to the compaction failures.
Sign in to join this conversation.
Also hit on a newer nightly, via cross-thread steers from delegated agents (not a composer steer).
t3_thread_send, steer mode) arrived during compaction.Environment: T3 Code
0.1.4-nightly.20261027.3796(server on Linux,t3 serve), Claude Code2.1.312, Claude provider.Agree with the expected behavior in the report: hold steers during compaction, then deliver them together into the same turn.