Uh oh!
There was an error while loading. Please reload this page.
feat(hashline): add hashline edit tool with experimental flags - #13405
feat(hashline): add hashline edit tool with experimental flags#13405watzon wants to merge 3 commits into
Conversation
- Add HashlineTool for line-based editing using hashline anchors - Add OPENCODE_EXPERIMENTAL_HASHLINE and OPENCODE_EXPERIMENTAL_EDIT flags - Add tool filtering in registry to conditionally enable hashline/edit tools - Add tests for hashline tool functionality and edit-family compatibility - Integrate hashline exposure in TUI session route and run command Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
IndianBoy42
commented
Feb 13, 2026
I'm trying out this PR, lets see how this goes (stream of consciousness sorry) My first thought it that this shouldn't be called More edit errors than I hoped ![]() One problem may be that the agent likes to use maybe the tool call failures tell us something: https://gist.github.com/IndianBoy42/9b87950e8845d36eea448cf318674425 is this because its minimax-2.5-free? need to try more with kimi. well kimi had no problems at all ![]() MiniMax2.5 made a few changes: https://github.com/IndianBoy42/opencode the key one is just calling the tool |
watzon
commented
Feb 13, 2026
I agree @IndianBoy42. Want to check out the changes? |
ars-ppi
commented
Feb 14, 2026
@watzon I guess this PR will not be merged as the core toolings should remain the same. Therefore this PR was merged #4956 and I created this Plugin for Opencode that needs a bit of tweaking and tuning and some benchmarks but is the way to go: https://github.com/ASidorenkoCode/openhashline |
IndianBoy42
commented
Feb 15, 2026
It is disappointing that that plugin no longer implements hashline editing. I don't think token savings was ever the goal of that, rather just reducing the errors in the tool calls, which you no longer benchmark. I like the architecture of building it as a plugin, that was my first instinct too but it didn't seem possible |
kldzj
commented
Feb 16, 2026
There also is izzzzzi/opencode-hashline (and #13664) |
izzzzzi
commented
Feb 18, 2026
Hi! Author of the opencode-hashline plugin here. Just wanted to clarify a couple of points:
Details: https://github.com/izzzzzi/opencode-hashline#benchmark |
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |



Summary
Adds an experimental hashline edit mode for line-anchored edits with stale-anchor protection, and wires it through tool selection + CLI/TUI surfaces.
edittool ID (not a separatehashlinetool), with schema switching when enabledhashlineoperations (set_line,replace_lines,insert_after,replace) and mismatch remap diagnosticsOPENCODE_EXPERIMENTAL_HASHLINE/OPENCODE_EXPERIMENTAL_EDITapply_patchflowLINE:HASH|contentwhen hashline mode is enabledall: true, no-op replace rejection)Verification
bun test test/tool/hashline-mode-selection.test.ts test/tool/hashline.test.tsbun run typecheckbun run buildSources used for hashline implementation
packages/opencode/src/tool/hashline.tspackages/opencode/src/tool/registry.tspackages/opencode/src/tool/read.tspackages/opencode/src/flag/flag.tspackages/opencode/src/cli/cmd/run.tspackages/opencode/src/cli/cmd/tui/routes/session/index.tsxpackages/opencode/test/tool/hashline.test.tspackages/opencode/test/tool/hashline-mode-selection.test.tsFixes#13393