[FEATURE] Compact tool
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
My current workflow requires I call /compact after each stage to use as little of the context window as possible.
Proposed Solution
I would like Claude to have a tool that lets it compact, something I can reference in a Skill as a cleanup step after some work has been accomplished.
Alternative Solutions
No response
Priority
Medium - Would be very helpful
Feature Category
API and model interactions
Use Case Example
- Claude just finished performing some research with subagents and compiled a research document
- Compact the context window to remove tool call results since they are now in the document
- Begin drafting an implementation plan
- Compact the context window
Additional Context
No response
Found 2 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5643
- https://github.com/anthropics/claude-code/issues/8656
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This issue has been automatically closed as a duplicate of #5643.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.