Scope
Implement the /compact slash command (originally issue #87). Removed from PR #108 to be implemented separately.
Requirements (from #87)
- ProviderAdapter interface gains a compactThread method (returns summary text)
- CodexSessionRuntime implements compactThread via Codex JSON-RPC
- OpenCodeAdapter implements compactThread via v2 SDK
session.compact()
- ClaudeAdapter and CursorAdapter keep "not supported" stubs (no programmatic compaction API)
- thread.context.summarize command + thread.context-summarized event schemas in contracts
- ContextTrimPoint gains optional summary field (and compactDurationMs)
- Server-side: call compactThread → dispatch summarize → dispatch trim with summary
- Session bootstrap after /compact: summary text sent as initial context to restarted provider session
- /compact parses in composer slash command system
- ContextSummaryBanner component renders above trim divider
- If provider compaction fails, trim still proceeds (no summary)
- Compaction duration recorded on trim point
- Tests: decider, reactor fallback, ContextSummaryBanner rendering, session bootstrap with summary
Open Design Decisions
Related
Scope
Implement the
/compactslash command (originally issue #87). Removed from PR #108 to be implemented separately.Requirements (from #87)
session.compact()Open Design Decisions
thread.context-summarizedevent, foldcompactDurationMsintoContextTrimPoint(see review on feat: provider compaction + context trim + archive-and-new + review flow #108 for analysis)thread.context-compactedeventRelated