Skip to content

bug(v2): compaction can fail to start with no actionable reason #35990

Description

@opencode-agent

Observed

In the V2 TUI, a high-context session (270.3k) emitted two consecutive compaction failures after a build completed:

Compaction could not start

The UI did not surface the reason compaction was rejected or provide a recovery action. The session was using Little Frank / anomaly (OpenAI) at high reasoning effort.

Observed at 2026-07-09 00:57 UTC. Source Slack thread.

Expected

  • A compaction request either starts or returns a typed, actionable reason it cannot start.
  • Repeated triggers do not render duplicate opaque failures without a state transition.
  • The session remains recoverable and the user can retry or continue safely.

Track

  • Identify the state/precondition or race that rejects compaction startup.
  • Carry a structured failure reason through the V2 event model and render it in the TUI.
  • Add regression coverage for repeated compaction attempts at the high-context transition.

Metadata

Metadata

Assignees

Labels

2.0bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions