Skip to content

Context compaction: retry a failed prompt group instead of dropping it #4557

Closed

Description

@terrykong

Follow-up to #4124 (context compaction, CC).

Problem

When a prompt group fails on infrastructure (a timeout, a transport error, or an agent error that reaches RL as an HTTP 500), the ordinary path re-runs the group with backoff, up to max_infra_attempts times (rollout_manager.py#L2215-L2219).

Under CC the group is never retried. It is dropped on the first failure (rollout_manager.py#L2210-L2214). The code comment gives the reason: RL keeps the record of which responses the agent accepted only for that request, so re-sending the group would lose it. The guide leaves retry for later checkpoint/retry work (context-compaction.md#L47).

Why it matters

At moderate scale, transient failures are routine. Without retry, every one of them becomes a lost prompt group. In #4124 as it stands, a lost group stops the whole run. Even if CC steps are allowed to train with fewer groups, every transient failure still throws data away, where the ordinary path would have recovered it.

Ask

  1. Keep, or rebuild, the per-request selection state so a failed CC group can be re-sent the same way the ordinary path re-sends it.
  2. Remove the CC-only break so CC uses the same retry budget (max_infra_attempts, backoff).
  3. Add a test: inject one transient infrastructure failure into a CC group, check that the group is retried, and check that the step then trains with the full set of groups.

Explainer for the current behavior: https://terrykong.github.io/gh-pages-poc/terryk/pr-4124-dropped-group.html

Activity

  1. added
    bug
    on Oct 7, 2026
  2. Epsilon006 commented on Oct 7, 2026

    @Epsilon006

    Hi, I can take a look at this. I’ll focus on preserving the context-compaction selection state across transient retries and add regression coverage for a fail-first/succeed-second prompt group. Happy to put up a PR if nobody’s working on it yet.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions