Skip to content
所有標籤

#edit-tool

2 篇文章

OMP hashline edit 與 noop-loop-guard:為什麼檔案編輯要 hash-anchored?模型 byte-identical 無操作重試 182/205 次怎麼被降伏的

OMP 用 hashline 格式取代傳統 line-number patch:以 4-hex content hash + N* syntactic block locator 定位,消除 whitespace drift;noop-loop-guard 在同一 session、同一 canonical path、同一 input hash 連續 3 次 no-op 時直接拋 ToolError,打破模型「以為 anchor 錯、把 payload 變大再試」的 182/205 次重試死循環(issue #2081)。

跟成熟 coding agent 學設計(10):編輯工具的取捨——unified diff、exact edit、hashline 與 whole-file

LLM 寫 unified diff 壞在簿記:hunk 行數算錯、上下文行幻覺。五家的答案分成兩派——把 diff 文法做簡單(Codex 拿掉行號)、或乾脆不用 diff(Claude Code/Pi/OpenCode 的 exact replace);OMP 更進一步用 hash 錨點綁住讀取狀態。looplane 走最小干預:保留 guarded apply_patch,加一個零模糊匹配的 replace_text,qwen3:4b eval 就從穩定失敗變 5/5。