You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
just have a look at this guy's idea and benchmark. Would be nice to have that option in opencode see how it is working? It's about giving hash identifiers to lines so edits will consume less tokens
Since the feature is already being tracked and assigned to maintainers, please continue the discussion there instead. You can add your support or additional feedback to #13393.
Reacted by Dennis Rutjes and Aleksandr Baryshnikov
It annotates every line with a deterministic hash tag (#HL 5:a3f|code) so the AI can reference and edit code by hash instead of fragile string matching. Benchmarked at 100% correctness (60/60) on react-edit-benchmark vs 96.7% for standard str_replace.
It works great, but it lacks a diff view. I hope OpenCode can natively support it.
it now works (v1.5.0) with the built in instead of replacing. still uses the hashline, it will resolve the hashline right before the edit. so it collaborate with the built-in tools
Activity
github-actions commentedon Feb 16, 2026
This issue appears to be a duplicate of existing discussion:
Since the feature is already being tracked and assigned to maintainers, please continue the discussion there instead. You can add your support or additional feedback to #13393.
izzzzzi commentedon Feb 18, 2026
Hey! This feature already exists as a plugin — opencode-hashline.
It annotates every line with a deterministic hash tag (
#HL 5:a3f|code) so the AI can reference and edit code by hash instead of fragile string matching. Benchmarked at 100% correctness (60/60) on react-edit-benchmark vs 96.7% for standardstr_replace.Install:
npm install opencode-hashlineAlso submitted a PR to add it to the ecosystem page if you want to track that.
AngDrew commentedon Mar 11, 2026
https://www.npmjs.com/package/@angdrew/opencode-hashline-plugin
i made it as plugin for current workaround
it will override the built in functions
FurryWolfX commentedon Mar 16, 2026
It works great, but it lacks a diff view. I hope OpenCode can natively support it.
AngDrew commentedon Mar 22, 2026
it now works (v1.5.0) with the built in instead of replacing. still uses the hashline, it will resolve the hashline right before the edit. so it collaborate with the built-in tools
gliptak commentedon Apr 29, 2026
is there a path adding https://github.com/AngDrew/opencode-hashline to https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/tool/edit.ts ?
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.