Skip to content

feat(cli): manual /compact slash command#128

Merged
oratis merged 1 commit into
mainfrom
feat/compact-command
May 31, 2026
Merged

feat(cli): manual /compact slash command#128
oratis merged 1 commit into
mainfrom
feat/compact-command

Conversation

@oratis
Copy link
Copy Markdown
Owner

@oratis oratis commented May 31, 2026

Summary

Auto-compaction already runs in the agent loop at the context threshold; this exposes a manual /compact that summarizes the conversation on demand (reuses core's compact()). Sets ctx.newHistory so the REPL swaps in the compacted history — mirroring /rewind summarize. No-ops cleanly when there's no provider or the conversation is already short.

Tests

+2 (commands.test.ts): no-provider guard, empty-history. CLI suite green. BEHAVIOR_PARITY /compact → ✅ (manual + automatic).

🤖 Generated with Claude Code

Auto-compaction already runs in the agent loop at the context threshold; this
exposes a manual `/compact` that summarizes the conversation on demand (reusing
core's compact()). Sets ctx.newHistory so the REPL swaps in the compacted
history, mirroring /rewind summarize. No-ops cleanly when there's no provider
or the conversation is already short.

Tests: +2 (no-provider guard, empty-history). BEHAVIOR_PARITY /compact → ✅.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 02a60ef into main May 31, 2026
3 checks passed
@oratis oratis deleted the feat/compact-command branch May 31, 2026 14:34
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