Skip to content

[Bug]: Mobile sends skip "When you return" idle compaction #27911

Closed

Description

@jason5545

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. Keep idle compaction at "When you return" (the default).
  2. Use a Claude thread above 200K tokens and leave it idle past its prompt cache TTL (70 minutes when the provider reports no TTL).
  3. Send a message to it from the iOS or Android app.

Expected behavior

The same as the web composer: the send compacts first ("Compact and send", a /compact turn with idleCompaction: "onReturn"), and the message runs after it.

Actual behavior

The message starts at once with no compaction, and Claude re-reads the whole context uncached.

Observed on 2026-10-31: an Android client returned to a 293,611-token Claude thread after 8h40m idle. The first request after the return reported cache_read 14,250 and cache_creation 282,954, the session's JSONL has no compact_boundary, and the run that carried the message has creationSource: "mobile".

"When you return" lives only in the web composer: shouldOfferResumeCompaction (apps/web/src/components/chat/ContextWindowMeter.logic.ts) feeds compactBeforeSend in planComposerTurn (ChatView.logic.ts), and useComposerSend sends /compact before the message (#16631). The server's IdleCompactionService handles only "Before the cache expires", and nothing in apps/mobile sends the compaction, so the setting does nothing for mobile sends.

Impact

Minor bug or occasional failure

Version or commit

main @ d2d1e4f

Environment

Android app (release build, Android 16), server on Linux and on the macOS desktop app, Claude Agent provider

Workaround

Send /compact by hand before the message, or switch idle compaction to "Before the cache expires".

Activity

  1. added a commit that references this issue on Oct 31, 2026
  2. jason5545 commented on Oct 31, 2026

    @jason5545
    ContributorAuthor

    Closing in favor of #27935, which fixes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions