Skip to content

Bug Description: LongCast 2.5 Preview enters an infinite loop while reading files. #52884

Closed as not planned

Description

@VanForever

Description

During a refactoring session on the LumeBook project, the model entered an infinite loop repeatedly making the same read calls on the same files (paragraph_blocks.dart and inline_text_frame.dart) without taking any action. The loop was only interrupted when the user reported the behavior.

Expected behavior: After reading the necessary files, the model should have proceeded with the implementation.

Observed behavior: The model got stuck repeating the same reads without advancing, consuming tokens without making progress.

Context: The project uses Flutter/Dart, and the editor_screen.dart file has 15,828 lines. The model was trying to understand the structure before proposing the UI refactoring to the Block Model (rendering a text widget per paragraph).

I've been experiencing this issue with LongCast 2.5 Preview since I first started using it 3 days ago. The model gets stuck in an infinite loop, repeatedly outputting the exact same phrase without progressing.

Image

Plugins

LongCast 2.5 preview

OpenCode version

1.18.18

Steps to reproduce

  1. Start a session in opencode with a large Flutter/Dart project (e.g., editor_screen.dart with 15,828 lines)
  2. Ask the model to perform a complex refactoring that requires reading multiple files before implementing (e.g., "refactor the UI to render one text widget per paragraph")
  3. The model starts reading the necessary files (paragraph_blocks.dart, inline_text_frame.dart)
  4. Instead of proceeding to implementation, the model repeats the same reads indefinitely
  5. The loop continues until the user manually interrupts
    Impact:
    Session blocked, impossible to advance the work. No damage to the code (no changes were made), but time and tokens are wasted.
    Possible cause:
    The model may be having difficulty deciding between continuing to read or starting to implement, resulting in a reading loop without progress.

Screenshot and/or share link

https://sshot.online/f/C3un7UY.png

Operating System

Mx Linux

Terminal

xfce4-terminal on MX Linux

Activity

  1. github-actions commented on Oct 3, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #47992: Describes an agent repeatedly using Read/Search without progressing to edits.
    • #43603: Describes no-progress loops during repeated file investigation.
    • #45442: Describes an agent repeating identical tool calls in a loop.
  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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

Metadata

Metadata

Assignees

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