claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Idle compaction pushes the away recap off-screen with post-compaction re-attachment lines

Open TakutoAshida opened this issue 1 month ago • 0 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I step away from a long session, two automatic features run one after the other, and the second one hides the first.

  1. After a few minutes away, the session recap (away summary) is shown.
  2. About 54 minutes after the last request, idle compaction runs. The conversation was 440K-520K tokens, well below the normal auto-compact threshold for the model.
  3. Right after the compaction, the re-attached files and restored skills are printed below the recap:
※ recap: <one-line summary of the session>
Read <path>/scratchpad/file_a.py (19 lines)
Read <path>/scratchpad/file_b.py (... lines)
Read <path>/scratchpad/file_c.py (... lines)
Read <path>/scratchpad/file_d.py (... lines)
Read <path>/scratchpad/file_e.py (... lines)
Skills restored (<skill-name>)

When I come back, these lines push the recap up and out of view. The recap is made for exactly this moment, but it is not what I see first. The recap text itself is intact; only the order on screen is the problem.

In the session transcript (.jsonl), the entries were in this order:

  • system / away_summary at 14:21 UTC
  • system / compact_boundary at 15:13 UTC (trigger: auto, 521,603 -> 14,185 tokens)
  • 5 x attachment (type: file)
  • invoked_skills

The last assistant response was at 14:17:53 UTC, and there was no user input before the compaction. The same thing happened earlier in the same session (last response 12:31 UTC, compaction 13:26 UTC, 443,443 -> 10,746 tokens).

What Should Happen?

When I return, the recap should be the first thing I see. Any of these would solve it:

  • Re-display (or regenerate) the recap after idle compaction finishes, so it appears below the re-attachment lines
  • Print the re-attachment and "Skills restored" lines above the recap, or collapse them into one line (for example: "Compacted while idle - 5 files re-read, 1 skill restored")
  • Add a setting to hide the post-compaction re-attachment lines

I want to keep idle compaction on, because it avoids resending a large uncached context when I return. So "idleCompaction": false is not a good workaround for me. Today I run /recap by hand, which generates a new recap.

Error Messages/Logs

No error messages. This is a display-order problem.

Steps to Reproduce

  1. Start an interactive session. Read a few files with the Read tool and invoke at least one skill.
  2. Let the conversation grow beyond 200K tokens (the default minimum for idle compaction).
  3. Leave the terminal open and keep the machine awake. After a few minutes, the session recap appears.
  4. Stay away for about 55 minutes so that idle compaction runs.
  5. Return to the terminal. The recap has scrolled up, and the visible area shows the Read ... (N lines) lines and Skills restored (...).

Claude Model

Other (Fable 5.1)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.303 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Warp

Additional Information

Related, but not the same:

  • #17428 (selective restoration after /compact)
  • #85138 (opt-out of post-compaction skill replay)
  • #86159 (configurable away-summary idle threshold)

Summary in Japanese (日本語の要約)

長い会話を放置すると、次の2つが順に動きます。

  1. 数分離れると、会話の要約 (recap) が表示される
  2. 約54分後に「放置中の圧縮」(idle compaction) が走り、読み直したファイルとスキルの行が recap の下に並ぶ

戻ってきた時には、recap がこれらの行に押し上げられて見えなくなっています。 recap の中身は壊れておらず、問題は画面に出る順番だけです。

放置中の圧縮は止めたくありません。 戻った後に、大きな会話をキャッシュなしで送り直さずに済むからです。

そこで、次のどれかをお願いしたいです。

  • 圧縮の後に recap を出し直す
  • 読み直しの行を recap の上に出すか、1行にまとめる
  • 読み直しの行を隠す設定を足す

TakutoAshida avatar Oct 19 '26 04:10 TakutoAshida