Repository navigation
fix(agents): an idle compaction is not work - #3
Merged
Merged
Conversation
Claude Code compacts a session left idle on its own and writes the summary as a user line with no reply after it. The AI Agents reader took it for a prompt and showed the session at work for up to an hour; the Sessions reader could too. Both now let it pass.
MF-DEEV
marked this pull request as ready for review
October 22, 2026 09:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Claude Code compacts an idle session, it writes the summary as a user line and no reply follows it. You can see this in the log as "Compacted while idle, before the prompt cache expired".
The AI Agents reader treated that line as a prompt. It showed the session as working, with a running timer, for up to an hour (the Claude resume window). The Sessions reader could do the same whenever the line was newer than the registry's last status change.
Both readers now skip user lines marked
isCompactSummary.Testing
./build.sh --test: every check passes except the known flaky clipboard testTests/NotchCompactTests.swift:337, which also fails on a clean upstream.HarnessReaderContractTestsandClaudeSessionReaderTestscover the summary line.