Skip to content

fix(agents): an idle compaction is not work - #3

Merged
MF-DEEV merged 1 commit into
mainfrom
feat/claude-sessions
Oct 22, 2026
Merged

MF-DEEV merged 1 commit into
mainfrom
feat/claude-sessions

Conversation

@MF-DEEV

@MF-DEEV MF-DEEV commented Oct 22, 2026

Copy link
Copy Markdown
Owner

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 test Tests/NotchCompactTests.swift:337, which also fails on a clean upstream.
  • New cases in HarnessReaderContractTests and ClaudeSessionReaderTests cover the summary line.
  • Found on a real session: its idle compaction at 09:49 kept the AI Agents timer running. After the fix, the island shows only the session that is actually at work.

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
MF-DEEV marked this pull request as ready for review October 22, 2026 09:57
@MF-DEEV
MF-DEEV merged commit 8f28868 into main Oct 22, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant