Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Sending with the "Resume with less context" banner showing silently runs /compact first #15769

Closedjlipworth(GitHub profile, opens in a new tab) opened this issue 2 comments

Since #15290, sending a message while the resume banner is visible dispatches /compact and queues the message behind it (ChatView.tsx compactBeforeSend). The banner still reads as an optional suggestion ("Resume with less context · 281k tokens from earlier · Compact · ✕"), so users who ignore it to keep their history get compacted anyway. The only way out is clicking ✕ ("Keep full history") before sending, and the UI never says so.

Repro: Claude thread, ≥100K tokens, idle ≥70 min → banner appears → type a message, press Enter → /compact user message appears and the typed message is queued (two client turns ~25 ms apart).

Expected: the banner states that sending will compact first, or sending keeps full history unless Compact is clicked.

Suggested fix: change the banner copy to announce compact-on-send (e.g. "Your next message compacts first"), keep ✕ as "Keep full history", and document it in docs/user/providers-claude.md. Alternatively, revert compactBeforeSend to opt-in.

  1. Note

    Grok responding on behalf of Julius.

    Triage

    Thanks for the clear report and repro, @jlipworth!

    What I found

    Confirmed on current main. The send path behaves as you describe, but the banner doesn't explain it.

    • What happens on send. Since #15290, sending while the resume banner is showing dispatches /compact and queues your typed message behind it (compactBeforeSend in apps/web/src/components/ChatView.tsx). The /compact turn shows up as its own user message, and your draft follows with queue dispatch so it doesn't steer into the compaction.

    • What the banner says. The copy wasn't updated when #15290 landed. It still shows "Resume with less context", the token count, a Compact button, and a dismiss control. "Keep full history" is only the dismiss button's accessible name, so it isn't visible, and nothing tells you the next send will compact.

    • How dismissing works. Dismissing is the opt-out. It lasts for the session, for that thread and context snapshot (threadId:updatedAt), and the banner comes back after a reload.

    • When compact-on-send is skipped. It doesn't run when:

      • compaction is unavailable,
      • a message is already queued,
      • more than one model is selected, or
      • the draft is itself /compact.

      The Compact button only runs /compact and leaves your draft alone.

    • Where it applies. Mobile has no resume banner, so this only affects web and desktop.

    • Docs. docs/user/providers-claude.md still describes the older opt-in suggestion.

    Likely fix area

    Some options:

    • Keep compact-on-send and make it visible. Change the banner copy to say the next message compacts first (for example, "Your next message compacts first"), and show "Keep full history" as visible text on the dismiss action. Then update docs/user/providers-claude.md to match.
    • Go back to opt-in. Revert compactBeforeSend so compaction only runs when you click Compact. The trade-off is that resumed sends would go back to resending the stale history that #15290 was addressing.

    Workaround for now: dismiss the banner before sending.

    A maintainer will decide on the fix direction.

  2. juliusmarminge added labelsbug

  3. juliusmarminge added labelsvia-triage

  4. Note

    Grok responding on behalf of Julius.

    This is fixed on main by #15771, which reverts #15290. Sending while the "Resume with less context" banner is showing now sends your message normally, without running /compact first. The banner's manual Compact action is still there if you want it. Closing, but please reopen if you still see it on a build that includes 2188bdd.

  5. juliusmarminge closed this

Sign in to join this conversation.