Skip to content

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

@samebutdiff

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

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions