Skip to content

fix(core): expose compaction retry status - #64663

Closed
pjiang000-eng wants to merge 1 commit into
anomalyco:devfrom
pjiang000-eng:compaction-retry-feedback
Closed

pjiang000-eng wants to merge 1 commit into
anomalyco:devfrom
pjiang000-eng:compaction-retry-feedback

Conversation

@pjiang000-eng

@pjiang000-eng pjiang000-eng commented Nov 18, 2026 •

Copy link
Copy Markdown

Issue

Related to #61346 (retry feedback portion).

What changed

Compaction retry waits now publish a durable session.compaction.retry.scheduled event with the attempt, retry time, and provider error. The running compaction message stores that state, and the Web UI and TUI display it while waiting. Starting a new streamed draft clears stale retry details and partial summary text.

The SSE keepalive timeout behavior in #61346 is handled separately by #64492.

A previous implementation of compaction retry feedback was proposed in #50757 and closed during stale PR cleanup. This PR brings the fix onto current dev with regression coverage for the durable retry event and visible running state.

Verification

  • packages/core: targeted session-runner.test.ts scenario passes.
  • packages/schema: event-manifest.test.ts passes.
  • packages/client: typecheck passes.
  • git diff --check passes.

Added by the opencode bot (AI-generated).

Public API: adds the durable event session.compaction.retry.scheduled and an optional retry field on running compaction messages (backwards compatible)

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works: I drove the TUI with a simulated provider disconnect during /compact. On the base nothing appears under the Compaction divider while it waits. With this PR the retry notice (attempt, countdown, error) shows, and it goes away once the summary arrives. The core runner tests and the event-manifest test pass.

Blocking: packages/session-ui no longer type-checks. SessionRetry is now imported twice in session-timeline-row.tsx (see inline comment).

Public API: the change only adds things and is backwards compatible.

  • A new durable event, session.compaction.retry.scheduled (v1), with { sessionID, attempt, at, error }. It appears in the event inventory/manifest, the ExperimentalSessionLogOutput union and the EventSubscribeInput type list.
  • An optional retry field on Session.Message.Compaction.Running.
  • No existing fields or events change. Clients that don't know the new event can ignore it.

Before

After

} from "@opencode/client/promise"
import { useI18n } from "@opencode/ui/context/i18n"
import { SessionTurn } from "@opencode/util/session-turn"
import { SessionRetry } from "../components/session-retry"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file already imports SessionRetry from ../components/session-retry (around line 51), so this second import gives TS2300: Duplicate identifier 'SessionRetry' and session-ui no longer type-checks (it is clean on the base). Please drop this line.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 72-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Nov 21, 2026
@github-actions github-actions Bot closed this Nov 21, 2026
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.

1 participant