opencode icon indicating copy to clipboard operation
opencode copied to clipboard

oldString and newString must be different

Open Aletheia-Prime opened this issue 1 month ago • 8 comments

Description

"oldString and newString must be different"

OpenCode version

v1.0.109

Steps to reproduce

Current problematic line ##:
await runCommand('npm', ['run', 'runtime:cli', 'queue', '--', VARIABLE], 'Queue item');
Should be:
await runCommand('npm', ['run', 'runtime:cli', 'queue', '--', VARIABLE], 'Queue item');

The line is already the way the software wants it to be, but Big Pickle is stuck in a loop.

Screenshot and/or share link

No response

Operating System

WSL 2.6.1.0

Terminal

WSL 2.6.1.0 in PowerShell 7.5.4

Aletheia-Prime avatar Nov 25 '25 03:11 Aletheia-Prime

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

  • #4466: "big pickle: blank edit loop" - Reports getting stuck editing with blank output until stopped with Big Pickle model
  • #266: "gemini doesn't handle edit tool very well" - Reports edit tool failures with "oldString not found in file" error suggesting whitespace normalization issues
  • #4322: "have error with tool call from 1.0.62 build" - Similar issue where GLM 4.6 fails with edit tool, suggesting oldString/newString problems with tool calls
  • #2052: "Subagents often getting stuck into tool usage loops" - Reports subagents getting stuck on tool usage loops
  • #3743: "Loop in certain models" - Reports models getting stuck in loops with certain providers (KIMI K2, MiniMax, GLM 4.6)
  • #2529: "Edit tool input string replacement idea" - Discusses model confusion when edits are formatted, causing subsequent edit failures

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Nov 25 '25 03:11 github-actions[bot]

This is not a bug, this is Big Pickle doing its thing

spoons-and-mirrors avatar Nov 25 '25 04:11 spoons-and-mirrors

Yeah if it got caught in a loop we have some other tickets tracking that, sometimes this happens to glm and grok code models.

rekram1-node avatar Nov 25 '25 04:11 rekram1-node

Running /compact seems to temporarily fix the infinite looping. Could be something related to large contexts?

tinmarr avatar Nov 29 '25 23:11 tinmarr

Yeah long contexts and just the more it sees a pattern the more likely it will repeat it, so you need to break the loop

rekram1-node avatar Nov 30 '25 06:11 rekram1-node

The issue is quite irritating and completely renders the opencode unusable. Perhaps it's time to move on to another AI coding tool. If an AI coding tool even fails to save itself, then it already justifies "Don't waste time" and just switch.

kianwoon avatar Dec 14 '25 15:12 kianwoon