Skip to content

/compact — provider compaction + summary banner #123

Description

@harrryyd

Scope

Implement the /compact slash command (originally issue #87). Removed from PR #108 to be implemented separately.

Requirements (from #87)

  1. ProviderAdapter interface gains a compactThread method (returns summary text)
  2. CodexSessionRuntime implements compactThread via Codex JSON-RPC
  3. OpenCodeAdapter implements compactThread via v2 SDK session.compact()
  4. ClaudeAdapter and CursorAdapter keep "not supported" stubs (no programmatic compaction API)
  5. thread.context.summarize command + thread.context-summarized event schemas in contracts
  6. ContextTrimPoint gains optional summary field (and compactDurationMs)
  7. Server-side: call compactThread → dispatch summarize → dispatch trim with summary
  8. Session bootstrap after /compact: summary text sent as initial context to restarted provider session
  9. /compact parses in composer slash command system
  10. ContextSummaryBanner component renders above trim divider
  11. If provider compaction fails, trim still proceeds (no summary)
  12. Compaction duration recorded on trim point
  13. Tests: decider, reactor fallback, ContextSummaryBanner rendering, session bootstrap with summary

Open Design Decisions

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions