Skip to content

Models get stuck in reasoning loop - making changes only in thinking, not actually executing tool calls #15271

Closed as not planned

Description

@samebutdiff

Description

When using models with extended thinking/reasoning (observed with Claude Sonnet and Opus 4.6, but likely affects others too), the model gets stuck in a loop where it plans and describes file changes entirely within its reasoning/thinking block, but never actually executes the corresponding tool calls to make the changes.

The model's thinking output shows it analyzing what needs to be done and describing the changes step by step (e.g., "Strip all view/render code from model.go", "Add showHelp field to Model struct"), but no actual file edits or tool calls are made. The build ends up interrupted without any real modifications applied.

When the I point this out, the model acknowledges the issue ("The user is right - I created the new views.go file but I haven't actually modified model.go") and restates its plan — but then falls into the same loop again, reasoning through the changes without executing them.

Plugins

No response

OpenCode version

1.2.15

Steps to reproduce

  1. Open OpenCode and start a session using a reasoning-capable model
  2. Ask the model to make edits to one or more files (e.g., refactor a large Go file, add a new field to a struct).
  3. Observe the model's thinking/reasoning output — it will describe the changes it intends to make in detail.
  4. Notice that no actual tool calls (file writes/edits) are executed; the build shows as "interrupted" with no changes applied.
  5. Inform the model that it hasn't made any changes. It will acknowledge this in its reasoning but repeat the same behavior, looping without taking real action.

Screenshot and/or share link

Image Image

Operating System

macOS

Terminal

Ghostty

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 26, 2026
  2. github-actions commented on Apr 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  3. PierrunoYT commented on May 12, 2026

    @PierrunoYT

    I'm experiencing the same issue on Windows (PowerShell). Claude Sonnet 4.6 with medium thinking enabled is essentially unusable in OpenCode — the model gets stuck planning in the thinking trace and never executes the actual tool calls.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions