Skip to content

Failed async compression clears the pending job and can resubmit the unchanged oversized snapshot #1877

Open

Description

@rep-de

Failed async compression clears the pending job and can resubmit the unchanged oversized snapshot

Verified in the v1.13.0 pin 1672852136fc87748249d22bce0819f33419ea79: compression.go, runCompression/triggerAsyncCompression.

On an LLM error, runCompression returns the original messages plus an error. The async completion path clears pendingJob. If the conversation remains above the trigger threshold, the next loop can start compression again; no failed-snapshot identity or finite retry allowance is recorded in compressionState. A deterministic provider rejection (for example context too large) can therefore cause the same large compression input to be sent repeatedly.

Suggested deterministic regression: use a fake client returning a deterministic context-limit error and a fixed over-threshold message history. Trigger compression, wait for completion, then trigger again without changing the snapshot. Assert one accepted send for that failed snapshot, an explicit failure/incomplete outcome, and no tight resend loop. Separately cover genuinely changed history and explicit transient-error retry policy. Preserve the original failed attempt and its outcome.

Please track the failed snapshot per conversation and apply a finite, classified recovery policy. Deterministic input-size errors should not consume repeated identical provider requests. Do not solve this by silently discarding history or returning a complete review.

Prepared with Codex assistance; source inspected at the pinned commit. This issue contains only a synthetic reproduction design, with no private repository data or credentials.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions