[Bug]: Claude thread cannot compact or continue after waking from usage-limit snooze #21569
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
Observed on 2026-10-19 in thread 1f91c9f2-b318-40d4-9de5-a23fcce89528 (local deep link: t3-thread://v1/1f91c9f2-b318-40d4-9de5-a23fcce89528).
- Use a long Claude Opus 5.5 thread until the session usage limit is reached. The UI showed a reset at 15:30 (Asia/Makassar).
- Snooze the thread until the limit resets. The problem appeared after the thread woke from snooze and began compacting (user-observed sequence).
- Try
/compact, then send a normal continuation message, then retry/compact.
The composer showed Compact 967k. This is one observed occurrence; the precise trigger/root cause is unconfirmed.
Expected behavior#
After the usage limit resets, the thread should compact successfully and resume work. A context-budget error recommending compaction must leave /compact usable. Retrying should recover the existing conversation without requiring a new thread.
Actual behavior#
The thread is stuck: both /compact attempts fail with a generic provider-start error, while a normal continuation fails with a context-handoff budget error. The suggested recovery action itself fails.
Timeline verified from durable T3 activity (Asia/Makassar, UTC+08):
- 14:04: usage limit reached, reset advertised for 15:30.
- 15:35:51:
/compact(run 19); fails at 15:37:22. - 15:37:52: continuation message (run 21); fails immediately at 15:37:53 with insufficient context allowance.
- 15:38:05:
/compactretried (run 22); fails at 15:39:37.
At inspection, thread status was failed, with no active run or pending requests.
Related: #17952 describes the same handoff error in a long Claude thread after a Fast Mode change, but lists /compact as a workaround. Here the reported trigger is waking from usage-limit snooze, and /compact fails repeatedly. #19875 is a similar recovery failure on OpenCode, a different provider.
Impact#
Blocks work completely
Version or commit#
0.1.1-nightly.20261019.3348 (installed desktop app)
Environment#
macOS; T3 Code Nightly desktop app; provider claudeAgent; model claude-opus-5-5 (UI: Claude Opus 5.5); Extra High effort; Full access; timezone Asia/Makassar.
Logs or stack traces#
Compaction (runs 19 and 22):
The provider could not start this turn. Retry the turn; if it keeps failing, check the provider setup and server logs.
Continuation (run 21):
Insufficient context allowance for the provider handoff. Compact the target conversation or use a larger-context model; the current request has not been truncated.
Run ID prefix: run:thread:1f91c9f2-b318-40d4-9de5-a23fcce89528:ordinal:
Screenshots, recordings, or supporting files#
Workaround#
No working recovery verified. Retrying /compact and sending a normal continuation both failed.
kr4chinin(GitHub profile, opens in a new tab) added labelsbug
kr4chinin(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge added labelsneeds more info
juliusmarminge added labelsvia-triage
juliusmarminge removed labelsneeds-triage
juliusmarminge removed labelsbug
Note
gpt-6.1-sol responding on behalf of @kr4chinin.
Thanks for separating the two failure paths. Understood: the continuation/handoff-budget wedge is covered by #17952. The remaining problem here is that
/compactitself cannot recover this thread.I checked the local logs and durable run records. All timestamps below are UTC on 2026-10-19; add 8 hours for Asia/Makassar.
1. Logs for the failed compaction runs
Unfortunately, the retained
server.trace.ndjson*files have already rotated past the requested 07:35–07:40 UTC window.server-child.loghas no matching entries, so I cannot provide the underlying exception from those attempts. The affected thread's provider event log has no entries for that window either: its final entry is an outgoingquery.closeat06:34:03.600Z.The durable run-attempt records still confirm:
run 19: started 07:35:51.791Z; failed 07:37:22.532Z (~90.741 s) run 22: started 07:38:06.100Z; failed 07:39:37.057Z (~90.957 s) providerInstanceId: claudeAgent model: claude-opus-5-5; effort: xhigh; fastMode: false nativeThreadId: ea241ce6-40e9-4296-b87b-38521a398396 providerTurnId: null for both attemptsBoth expose only the generic provider-start error already quoted in the issue. The similar ~91-second durations may be useful for investigation, but I do not have evidence identifying the underlying cause.
There is also an earlier, pre-reset compaction failure in the provider log. Relevant fields only, with unrelated payload omitted:
06:03:59.856Z system/status: compacting 06:04:01.654Z rate_limit_event: rejected; rateLimitType=five_hour; resetsAt=1792395000 06:04:01.658Z system/status: compact_result=failed; compact_error="You've hit your session limit · resets 3:30pm (Asia/Makassar)" 06:34:03.600Z outgoing query.closeThat establishes a failed compaction before the reset; it does not establish why the later attempts failed.
2. Could a new Claude Opus thread start then?
Yes, a fresh delegated T3 thread using the same
claudeAgentinstance andclaude-opus-5-5started its first run at07:37:40.994Z. Its provider log shows a new session initialized at07:38:07.169Z, followed by actual Opus assistant output at07:38:46.293Zand tool-use output at07:38:46.302Zand07:38:56.997Z(content omitted).So a fresh delegated Claude session was working during the failing
/compactattempts. I did not run a separate fresh top-level-thread test at that exact time. Other existing Opus threads also resumed successfully after the 07:30 UTC limit reset.Checked on main 70e5e384da, Linux web dev app with isolated copied state, Claude CLI 2.1.303 and Opus 5.5 (Medium effort, Fast off).
Control attempt: started a fresh conversation, ran
/compact, snoozed it, used Wake now, then ran/compact, sent a continuation, and retried/compact. The initial compaction succeeded (84K → 1.47K). Immediately after waking, Claude returned “Not enough messages to compact”; the continuation returnedCONTINUEDsuccessfully. The final/compactretry also succeeded (79.9K → 1.54K). This did not produce the generic provider-start error or the handoff-budget error.This does not reproduce the reported conditions: the original 967K native conversation, real five-hour limit/reset, Extra High effort, and macOS desktop were not exercised here. The original compaction exception is still unknown; similar timing alone does not establish that this duplicates #22198.
Does this still occur on the latest nightly, and which Claude CLI version is installed? If it recurs, please capture the server exception and provider log around the failed
/compactimmediately (before rotation), including the run timestamp, and whether the same conversation can continue directly in Claude CLI. Remove credentials and unrelated conversation content. Leaving this open withneeds more info.Runtime transcript (UTC, persisted dev run records):
22:41:41–22:41:46 fresh message: completed, OK 22:41:58–22:42:11 /compact: completed, 84K → 1.47K 22:43:44–22:43:45 /compact after manual wake: completed, Not enough messages to compact 22:43:57–22:43:59 continuation: completed, CONTINUED 22:44:07 /compact retry: completed, 79.9K → 1.54Kgithub-actions[bot](GitHub profile, opens in a new tab) removed labelsneeds more info
Note
claude-opus-5-5 responding on behalf of @kr4chinin.
Thanks for the control run. The problem no longer recurs on my side, so I'm closing this.
For the record:
- Versions. At the time of failure: T3
0.1.1-nightly.20261019.3348, Claude CLI2.1.303. Now: T30.1.2-nightly.20261022.3512, Claude CLI2.1.310. - Original thread. It's no longer available, so I couldn't retry that exact conversation on the latest nightly.
- Native session file (
ea241ce6-….jsonl, ~22 MB), in case it helps with #22198: during run 19 the CLI resumed the session at07:37:10Z, 78.6 s after the run started. T3 failed the run 12 s later, at the ~90 s mark. After that there is no/compactentry, compact boundary or API request, and run 22 left no entries at all. So the compact prompt never reached the model. That matches the pre-prompt failure shape in #22198, but without the exception text it isn't confirmed.
If it comes back, I'll capture the server exception and provider log immediately and reopen.
- Versions. At the time of failure: T3
kr4chinin(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
The continuation error is the same wedge as #17952, so it isn't new. The failed
/compactruns need server logs before we can tell what broke.Continuation: each earlier failed or interrupted run whose history was not delivered, such as the usage-limit run or a failed compact, gets replayed as a missed-run handoff (ProviderTurnStartService.ts:1056-1062). The handoff allowance reserves a quarter of the window (handoffBudget.ts:133). At 967k of 1M it is zero, so any replay fails with this error (ContextHandoffDelivery.ts:77-79). That matches #17952 exactly. Further details belong there.
Compaction:
/compactskips that budget check (ContextHandoffDelivery.ts:39-40 and 77-78), so the allowance did not cause runs 19 and 22 to fail. Turn start wraps any underlying failure in the generic "could not start this turn" message (ProviderTurnStartService.ts:1185-1195), which hides the real cause.Please reply with: