Claude’s automatic compaction appeared as generic work until it had already finished. The adapter now publishes a running compaction item and settles that same item, preserving its identity, start time, and token counts. Web and mobile recognize running compaction in the active run, alongside the existing manual /compact path. These client checks also recognize Codex’s existing running compaction items, so follow-ups queue during those automatic compactions too.
Contributor commits are preserved, with main merged and the adapter implementation rebuilt to share the running/boundary item construction. Thanks @maria-rcks for #15631.
Closes #10959.
Verification:
- Three focused suites: 496 → 493 tests (server adapter 292 → 290, mobile activity 101 → 100, shared presentation 103 unchanged). Restoring main production produced six assertion failures; restoring the fix returned all 493 to passing.
- Scoped lint and formatting pass, with one inherited unused-variable warning. Server, web, mobile, and client-runtime typechecks pass.
- Independent full-PR reviews found stale running items after a compaction outcome status; reported outcomes now settle immediately, and late success boundaries enrich the same item. A second round found hook-skipped compaction could remain running; a bare idle status now stops it, while permission-only updates preserve it. Both independent third-round full-PR reviews returned no findings; the final round also reran all 493 targeted tests.
- An isolated Linux web client exercised a real send through the production SDK, adapter, and orchestration using a mocked Claude CLI. It showed the running compaction and completed token-count divider, a failure label while the turn continued, a skipped compaction stopping before the turn finished, and manual /compact interrupted through Stop generation. This verifies integration with controlled provider frames; native Claude auto-compaction was not exercised. Status-to-boundary matching assumes sequential compaction cycles, as in the inspected installed CLI 2.1.303.
- Native mobile verification is unavailable: the Device tool reports “Agent device access is turned off for this environment.” macOS, Windows, Electron desktop, iOS, and Android were not run.
Before (actual main production, same prompt, fixture, and viewport; composer region cropped):

After:

Before recording · After recording · Failure while the turn continues · Skipped compaction while the turn continues
Maintainer takeover: Codex gpt-6-astra tests and gpt-6.1-sol implementation, with independent Claude Opus 5.5 and Codex gpt-6-sol review through T3 Code.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
9ddedd50-5548-4d67-853f-6a709dd1ec28📥 Commits
Reviewing files that changed from the base of the PR and between 4ee6bfd50ef4a089440d5c3662db2298da9cc50e and 8c4d35b5aa96f7394078ade3bf1ccd29d775c138.
📒 Files selected for processing (6)
apps/mobile/src/lib/threadActivity.test.tsapps/mobile/src/state/use-thread-composer-state.tsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.tsapps/web/src/components/ChatView.tsxpackages/client-runtime/src/work-log/presentation.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
📝 Walkthrough
Claude automatic compaction now emits a running work-log item and completes it at the compact boundary. If the turn ends first, the server emits a terminal item. Web and mobile views recognize running, failed, interrupted, and cancelled compaction states.
Changes: Claude compaction status lifecycle
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts,apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsapps/web/src/components/ChatView.tsx,apps/mobile/src/state/use-thread-composer-state.ts,packages/client-runtime/src/work-log/presentation.ts,apps/mobile/src/lib/threadActivity.test.tsPriority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Low
Sequence Diagram(s)#
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
8c4d3The change is mergeable after normal checks; no concrete issue requiring a fix before merge was identified.
Security architecture risk: 🔵 Low · up to
8c4d3The change adds progress reporting without an evidenced increase in access or privileges. Risk is low, with end-to-end behavior and recovery after abrupt termination still unverified.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
Pre-merge checks:
4 · 
1
#10959]ClaudeAdapterV2emits one running compaction item for Claude’scompactingstatus and completes that same item atcompact_boundary, preserving its start time and adding token counts. `Ch…#10959]. The adapter implementation and tests handle automatic compaction events and cleanup. Web, mobile, and shared presentation changes show the active state and prese…Full details: Linked Issues check
Explanation
[
#10959]ClaudeAdapterV2emits one running compaction item for Claude’scompactingstatus and completes that same item atcompact_boundary, preserving its start time and adding token counts.ChatViewand the mobile composer recognize a running item for the active run while retaining the manual/compactpath. Adapter tests cover repeated status frames, boundary completion, terminal outcomes, idle frames, and the next turn. Client-side automatic compaction and native runtime checks remain unverified, but the code and automated tests address the issue’s coding requirements.Full details: Out of Scope Changes check
Explanation
All reported changes support [
#10959]. The adapter implementation and tests handle automatic compaction events and cleanup. Web, mobile, and shared presentation changes show the active state and present terminal results. No unrelated changes are evident in the reviewed diff.Full details: Description check
Explanation
The description explains the problem and implementation, links the related issue and prior discussion, documents focused verification and UI evidence, and states unverified environments and limitations. Although it does not repeat the template headings, it provides the required information in a complete, relevant form.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment `@coderabbitai help` to get the list of available commands.