@the-agency/pi-hashline-edit
Pi extension providing hashline-based file reading and editing with staleness-checked line addressing.
Package details
Install @the-agency/pi-hashline-edit from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@the-agency/pi-hashline-edit- Package
@the-agency/pi-hashline-edit- Version
0.3.0- Published
- Sep 11, 2026
- Downloads
- 235/mo · 203/wk
- Author
- joshmock
- License
- MIT
- Types
- extension
- Size
- 35.6 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-hashline-edit
A Pi extension, to substitute for the built-in edit tool, which uses a hashline-based file editing strategy to improve the accuracy and efficiency of agents' file-editing abilities, reducing the likelihood of failed edits that require extra turns and tokens by the agent.
This editing strategy has improved the edit success rate of Gemini models by 8%, Claude Sonnet 4.5 by 14.4%, etc. and reduced overall token usage, without requiring any additional training to these models.
Heavily inspired by/borrowed from Can Bölük's oh-my-pi fork of Pi. This is a pure JavaScript implementation of the hashline editing feature, extracted into a standalone Pi extension with adjustments for Node and Bun compatibility. See Can's blog post, I Improved 15 LLMs at Coding in One Afternoon. Only the Harness Changed to understand how hashline editing works and how it improves coding agent accuracy.
Note: oh-my-pi's hashline edit tool has been rewritten as a Rust crate, which significantly changed the underlying implementation. This extension originally provided parity with oh-my-pi's JS-based solution, but cannot guarantee it as omp's solution continues to evolve.
Install
pi install npm:@the-agency/pi-hashline-edit
This will enable the hashline_read and hashline_edit tools, and disable the built-in edit tool, to ensure models are not confused about which editing tool to use.