Implement hash based edit tool
Resolved 💬 2 comments Opened Feb 12, 2026 by 0xdeafbeef Closed Feb 12, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
cli/core
What feature would you like to see?
Implement hash based edit tool described in https://blog.can.ac/2026/02/12/the-harness-problem/
tl;dr
Now bear with me here. What if, when the model reads a file, or greps for something, every line comes back tagged with a 2-3 character content hash: `` 1:a3|function hello() { 2:f1| return "world"; 3:0e|} `` When the model edits, it references those tags — “replace line 2:f1, replace range 1:a3 through 3:0e, insert after 3:0e.” If the file changed since the last read, the hashes (optimistically) won’t match and the edit is rejected before anything gets corrupted. If they can recall a pseudo-random tag, chances are, they know what they’re editing. The model then wouldn’t need to reproduce old content, or god forbid whitespace, to demonstrate a trusted “anchor” to express its changes off of.
Additional information
_No response_
2 Comments
Thanks for the suggestion, but I think our current
apply_patchmechanism, which we've spent a lot of time tuning and training our models to use effectively, has benefits over a hash-based solution.You'd need an actually competent model to implement this.