/compact — provider compaction + summary banner#105
Conversation
- Add thread.context.compact + thread.context.summarize command schemas - Add thread.context-compacted + thread.context-summarized event schemas - Add optional summary field to ContextTrimPoint and ThreadContextTrimCommand - Decider: validate and emit events for compact and summarize commands - Decider: include summary in trim point when provided via thread.context.trim - ProviderAdapter: add compactThread method to interface - CodexSessionRuntime: implement compactThread via thread/compact/start RPC - Claude/OpenCode/Cursor adapters: return unsupported error for compactThread - ProviderService: delegate compactThread to adapter - ProviderCommandReactor: process thread.context.compact — call provider, emit summarize + trim - Composer: parse /compact, register in autocomplete, dispatch in ChatView - ContextSummaryBanner component: blue-tinted 'Context compacted' callout - MessagesTimeline: render summary banner above trim divider when summary present - Tests: contracts schemas, decider validation, composer parsing
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 721b974621
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| summary = String( | ||
| (item as Record<string, unknown>).encrypted_content ?? "", | ||
| ); |
There was a problem hiding this comment.
Avoid displaying encrypted compaction payloads as summaries
When Codex emits a compaction item, the generated schema exposes encrypted_content as the opaque context payload for the provider, not a human-readable summary. Copying that field into summary means the later trim point and ContextSummaryBanner will show users an encrypted/base64-looking blob after a real /compact; if there is no plaintext summary field available, this should be left empty or sourced from an actual readable summary.
Useful? React with 👍 / 👎.
Implements /compact: asks the provider to summarize conversation history, then trims context and shows a summary banner.
Changes
Context compacted+ summaryAcceptance criteria
Closes #87