tool ERROR: "old_string not found in file. The text to replace must exist in the file."
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 134
- Avg merge
- 14h 57m
- Merged PRs (30d)
- 307
Description
Seeing too many of these tool errors every session (codex oauth).
```
old_string not found in file. The text to replace must exist in the file.
```
```json
{
"tool": "file_edit_replace_string",
"args": {
"path": "file.go",
"old_string": "\t\t\tif len(items) > 0 {\n\t\t\t\tfmt.Println(\"redacted\")\n\t\t\t}\n",
"new_string": "\t\t\tif len(items) > 0 {\n\t\t\t\tfmt.Println(\"redacted.\")\n\t\t\t}\n",
"replace_count": 1
}
}
```
```
Guard mismatch: unable to find insert_after substring in the current file.
```
```json
{
"tool": "file_edit_insert",
"args": {
"path": "file.go",
"insert_before": null,
"insert_after": "\t\t\t\tfmt.Println(\"redacted\")\n\t\t\t}\n",
"content": "\n\t\t\t// Redacted"
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.