Skip to content

read: varying out-of-range offsets evade doom-loop detection #60442

Closed as not planned

Description

@Arieg419

Description

Repeated reads beyond EOF evade doom_loop when the model changes the offset. Reads at offsets 636, 700 and 800 of the same unchanged 635-line file fail equivalently, but have different inputs. A valid read between those failures also prevents consecutive-call detection.

A bounded local fake-provider regression continues to another provider call instead of requesting the configured doom_loop permission. Expected: recognize equivalent range failures within one user turn, preserve explicit permission rules, and reset when the file changes.

Related: #45442 and #53032. This concerns varying invalid reads on maintained v1; that PR targets identical calls in the newer core.

Plugins

None in the reproduction.

OpenCode version

1.19.5 (v1, 006d837c5022ea5278162307c04c78412cfae9f3)

Steps to reproduce

  1. Create a 635-line text fixture.
  2. In one turn, use a local fake provider to request reads at offsets 700, 600, 900, 600 and 1100 (three failures interleaved with two valid reads).
  3. Configure doom_loop to deny; queue those five tool responses followed by one terminal text response.
  4. Observe that the third equivalent invalid read does not request doom_loop, so the loop makes a sixth provider call instead of stopping after five.

Operating System

macOS arm64. Reproduced in the package tool and session test harnesses.

Activity

  1. opencodejr commented on Oct 30, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report and the fake-provider regression.

    This is about OpenCode v1 (1.19.5). v1 now only gets fixes for critical bugs: data loss, security problems, or crashes and breakage with no workaround. doom_loop is a best-effort heuristic, and reads at varying out-of-range offsets getting past it doesn't meet that bar, since the session can still be interrupted. So this is unlikely to be fixed in v1.

    We'd encourage moving to v2 (@opencode/cli), where loop protection is being worked on. Related items:

    If you think this is critical, or you can reproduce it on v2, please reply here with the details.

  2. opencodejr commented on Oct 31, 2026

    @opencodejr
    Contributor

    Closing this as not planned. It's about OpenCode v1 (1.19.5), which only gets critical fixes, and we didn't hear back that it's critical or also happens on v2. Thanks again for the detailed report and regression test.

    Loop protection for repeated tool calls is being worked on in v2 (see #53032 and #45442). If you can reproduce varying out-of-range reads getting past loop detection on v2, please open a new issue with the v2 version and steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions