Skip to content

feat(desktop): support manual context compaction in Side Conversations - #4532

Open
testikun wants to merge 2 commits into
apache:mainfrom
testikun:codex/issue-4521-side-compact
Open

feat(desktop): support manual context compaction in Side Conversations#4532
testikun wants to merge 2 commits into
apache:mainfrom
testikun:codex/issue-4521-side-compact

Conversation

@testikun

@testikun testikun commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Support the exact /compact command in idle, committed Side Conversations.
  • Route compaction to the companion Session without sending /compact to the model or touching the source Session.
  • Keep draft, quote, and attachment state intact when the fork is preparing, running, archived, unavailable, or the Host rejects the operation.

Implementation

  • Added the existing Session-scoped compaction operation to the Workbar Side Conversation port and Desktop adapter.
  • Added command interception before steering/send and reused the existing compaction progress/terminal presentation semantics for the companion panel.
  • Added retry-safe in-flight fencing, exact model/archive checks, and localized workspace-unavailable error handling.
  • Fixed Runtime Host terminal projection so synthesized complete events preserve contextCompactionOutcome, allowing asynchronous Side Conversation compaction to settle and release its lock.

Tests

  • Runtime Host projector regression: 20/20 passing.
  • Desktop Side Conversation focused suite: 32/32 passing.
  • Desktop typecheck: passing.
  • Renderer architecture scanner: passing.
  • ASF header and git diff --check: passing.
  • Full workspace suite under Node 24: first run reached 1,566 passing / 12 skipped with one unrelated owned Host exits promptly after its first connection closes failure; the complete Runtime Host suite rerun passed 1,567 / 12 skipped.

Platform limitations

  • This is a Desktop Workbar feature only; CLI/TUI /compact behavior is unchanged.
  • It uses the existing Runtime Host context-compaction capability, so the operation remains subject to the selected model, workspace availability, and platform support already enforced by that capability.

Fixes #4521

@github-actions github-actions Bot added the effort/L Under 1000 readable lines label Sep 2, 2026
Add exact /compact handling for idle committed Side Conversations, routing compaction to the companion Session and preserving existing feedback and draft ownership.

Generated-by: Codex
@testikun
testikun force-pushed the codex/issue-4521-side-compact branch from ba33e27 to 47a7fde Compare September 2, 2026 05:20
@testikun
testikun force-pushed the codex/issue-4521-side-compact branch from 5f3797a to d0515a3 Compare September 2, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/L Under 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(desktop): support manual context compaction in Side Conversations

1 participant