Skip to content

The open source coding agent.

TypeScript

adjust edit tool multiple matches error wording (#3418)

Aiden Cline707ed7238158
diff --git a/packages/opencode/src/tool/edit.ts b/packages/opencode/src/tool/edit.ts
index c761801a6e2..c35f8969713 100644
--- a/packages/opencode/src/tool/edit.ts
+++ b/packages/opencode/src/tool/edit.ts
@@ -621,6 +621,6 @@ export function replace(content: string, oldString: string, newString: string, r
throw new Error("oldString not found in content")
}
throw new Error(
- "oldString found multiple times and requires more code context to uniquely identify the intended match",
+ "Found multiple matches for oldString. Include more surrounding code lines in oldString to uniquely identify which occurrence to replace.",
)
}