Skip to content

fix(auto-handoff): skip threads whose last prompt was /compact - #56

Merged
Jish2 merged 1 commit into
mainfrom
fix/auto-compact-loop
Oct 29, 2026
Merged

Jish2 merged 1 commit into
mainfrom
fix/auto-compact-loop

Conversation

@Jish2

@Jish2 Jish2 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

The auto-compact watcher re-queued /compact on threads it had already compacted, every ~45 min. /compact logs its <local-command-stdout>Compacted</local-command-stdout> reply as a separate user entry, so last_prompt_is_compact saw that instead of the command. It now ignores those entries.

Verified with a dry run against the real session logs: 944eab42 now skips as already compacted.

🤖 Generated with Claude Code

The Compacted reply is logged as its own user entry after the command, so the
last-prompt check saw it instead of the /compact and recompacted every idle stretch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Jish2
Jish2 merged commit 76433b9 into main Oct 29, 2026
1 check passed
@Jish2
Jish2 deleted the fix/auto-compact-loop branch October 29, 2026 06:09
@claude

claude Bot commented Oct 29, 2026

Copy link
Copy Markdown

Claude review: skipped (the PR is already merged/closed)

Checked only the PR state; no code review was run.

Not approved: the PR is closed, so there is nothing to approve.

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