Skill invocations re-executed after conversation compaction
Resolved 💬 5 comments Opened Jan 23, 2026 by lweiler-lab Closed Mar 3, 2026
Bug Description
After conversation compaction, Claude re-executes skills (like /gh-bug) that were already completed earlier in the session, creating duplicate issues/actions.
Steps to Reproduce
- In a long conversation, invoke a skill like
/gh-bugwith arguments - Continue working on other tasks until the conversation compacts
- After compaction, Claude sees the skill invocation in system-reminder context and re-executes it
Expected Behavior
Skills that were already executed before compaction should not be re-executed after compaction.
Actual Behavior
The skill invocation is preserved in a <system-reminder> block:
<system-reminder>
The following skills were invoked in this session. Continue to follow these guidelines:
### Skill: gh-bug
...
ARGUMENTS: [original arguments]
</system-reminder>
Combined with the continuation prompt "Continue with the last task that you were asked to work on", Claude interprets this as a pending task and re-executes the skill.
Root Cause Analysis
- Skill invocations are preserved in system-reminder blocks with "Continue to follow these guidelines"
- The compaction summary doesn't indicate the skill was already executed
- The continuation prompt instructs to "continue with the last task"
- Claude sees an apparent active instruction and executes it again
Suggested Fix
Either:
- Remove skill invocation context from system-reminders after execution
- Mark completed skill invocations as "completed" or "executed"
- Include in compaction summary that specific skills were already executed (e.g., "Bug #XX was created for issue Y")
- Change the system-reminder wording from "Continue to follow these guidelines" to something that indicates historical context
Environment
- Claude Code CLI
- Model: claude-opus-4-5-20251101
- Observed multiple times across compaction events
🤖 Generated with Claude Code
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗