Skip to content

fix(session): bound exhausted escalation and retain history after blank automatic summaries #841

Open

Description

@agenteinstinct1-max

Scoped defects

Follow-up to #830, implemented by #835. This issue tracks only the bounded automatic-escalation and blank automatic-summary defects, not full #830 acceptance.

  • Exhausted reduction below the independent compaction gate needs an automatic compaction attempt in the core v2 and opencode v1 paths. Re-exhaustion after compaction must reach dispatch or a terminal failure instead of recursively summarizing without progress.
  • A blank automatic summary with a normal finish must not stay eligible for filterCompacted(). Otherwise original protected history can disappear even when no successful Compacted event is emitted.
  • A failure continuation must not say compaction succeeded or original media was removed. A replay copy may use media placeholders without claiming the original history lost its attachments.

Acceptance for this scoped issue

  • Exercise exhausted-only escalation and bounded re-entry through the real runner/prompt paths; preserve the source gate for disabled automatic compaction.
  • Persist whitespace-only automatic output with a normal finish in the unit fake, then verify summary: false, original user text and image visibility in filtered history, and honest overflow continuation.
  • Verify protected original history remains in the ordinary dispatch through the real prompt path, with no successful Compacted event for a blank summary.
  • Run required tests, type checks and Linux/Windows CI on the exact final candidate. Independent review must cover all changed files. A clean source review alone does not complete this issue.

Still open under #830

Focused core tests for no summarizable head, an oversized summary prompt, provider failure and empty summary; real replay behavior; stop/error behavior; the exact v1 auto=false exhausted-trigger regression; and manual blank-compaction handling. Existing source inspection or a disabled-overflow test does not replace these checks. Merging #835 must not close #830 or claim these checks passed.

Sources: #830 and #835. The source-only V4 review is https://arena.ai/agent/01a1c817-7dc7-77ed-8953-3ac7fb8a614a . Exact-head qualification is still pending as this issue is opened.

Activity

  1. added
    priority: high
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions