Skip to content

Fix compaction across agent harnesses and clear completed progress - #761

Merged
sox8502 merged 8 commits into
mainfrom
daniel/reproduce-535
Oct 23, 2026
Merged

sox8502 merged 8 commits into
mainfrom
daniel/reproduce-535

Conversation

@sox8502

@sox8502 sox8502 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Saved Codex, Claude, and OpenCode chats now restore their native session before compaction. Antigravity uses native /compact; unsupported ACP agents show a disabled command; typed /compact and /summarize silently clear without sending a message or showing a notice. Compaction results no longer get overwritten by a delayed progress response, and Claude’s native status/error events settle the indicator correctly.

Closes #535. Extends the scope of the Codex-only work in #536.

Co-authored with Aleksandr Rodionov (Rexarrior), author of the original issue and Codex compaction fix.

Validation:

  • Rust formatting, clippy, locked build, and full tests (1,266 passed; 3 ignored).
  • UI typecheck/build, 421 UI tests, localization/style checks, and helper/Python checks.
  • Real macOS in-app browser: Codex, Claude, OpenCode, and Antigravity cold compaction; preserved native IDs and follow-up context.
  • Codex and Claude warm compaction; unsupported ACP menu, typed command/alias, and backend rejection.
  • Cursor real-provider API compaction and context-preserving fallback.
  • Before/after screenshots captured locally for each addressed UI failure.
  • Cursor compaction through the in-app browser.
  • Unsupported /compact and /summarize with the menu open: Enter silently consumes the command without a message or notice; Tab preserves keyboard focus navigation.
  • Unsupported new-chat and saved-chat regression coverage; saved-chat silent no-op verified in-app.
  • Greptile review of code commit db33e45: 5/5, no actionable findings. The later co-author credit commit changes no files.
  • GitHub platform CI.

Dev slot: http://127.0.0.1:5204 (local only). Screenshot evidence is retained in the task’s local compaction evidence report; no unrelated project screenshots are uploaded publicly.

Extended testing also hit one transient OpenCode Stop/persistence failure during severe local disk pressure, leaving a stale marker. Its original error was not captured; two subsequent UI stop/retry checks passed without code changes. That anomaly is recorded in the local evidence and is not claimed fixed here.

@sox8502

sox8502 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Restores saved Codex, Claude, and OpenCode sessions before native compaction, adds native Antigravity compaction, and keeps completed progress from being replaced by a delayed response.

  • Saved chats compact with their original agent session.
  • Unsupported agents cannot start compaction from the menu or composer.
  • Compaction progress now follows the agent’s final result.

The ancestry check passed, but the merge bases differed. This review therefore used the full PR diff as the changes since the previous review. No tests were executed during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[User requests compaction] --> B{Agent supports it?}
  B -->|No| C[Clear typed command silently]
  B -->|Yes| D[Backend reserves the chat]
  D --> E[Publish progress message]
  E --> F[Restore or reuse native session]
  F --> G[Run compaction]
  G --> H[Update the same message with the result]
  H --> I[Keep result when the initial response arrives late]
Loading

Reviews (5) · Last reviewed commit: "Merge origin/main and regenerate dashboa..." · Reviewed by Greptile

Comment thread ui/src/components/ChatPanel.tsx Resolved
@sox8502

sox8502 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@sox8502

sox8502 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review — User-approved behavior: unsupported /compact and /summarize silently clear the composer without sending a message or displaying a notice. The disabled menu row remains. Final UI tests and in-app checks verify this behavior.

Comment thread ui/src/components/ChatPanel.tsx Resolved
@sox8502

sox8502 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review — Fixed the new-chat finding: support is checked before the missing-session notice. Regression tests cover unsupported new and saved chats, plus supported compaction. Integrated current main before verification; all required Rust checks and 421 UI tests pass.

@sox8502

sox8502 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review — Current main is integrated and generated dashboard assets are rebuilt. The previous new-chat finding is fixed: unsupported /compact and /summarize return before any empty-chat notice. All 1,266 Rust tests and 421 UI tests pass; saved-chat silent behavior is verified in the app.

Co-authored-by: Aleksandr Rodionov <rexarrior@yandex.ru>
@sox8502
sox8502 merged commit 228231a into main Oct 23, 2026
18 checks passed
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.

Codex compaction fails for inactive chats instead of resuming their threads

1 participant