anomalyco / anomalyco/opencode
Read tool skips a blank line at a pagination boundary
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
A paginated read can silently skip a blank line. The reader includes it, but model-content serialization removes it while retaining the continuation offset beyond it.
Plugins
Built-in read tool; no external plugins.
OpenCode version
V2 source checkout at 541937d12449e64d078c67e9013f1c288004b83f.
Steps to reproduce
- Create a temporary file containing
"alpha\n\nomega\n". - Read it with
offset: 1andlimit: 2. - Inspect the text returned to the model.
Expected: lines 1–2, including a numbered blank second line, then continuation at 3. Actual: the heading says lines 1–1, only alpha is shown, and continuation still starts at 3. Reading three lines or the whole file preserves the internal blank line.
Operating System
macOS arm64, Bun 1.4.1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the built-in read tool and the model-content serialization path, then reproduce the issue using a file containing "alpha\n\nomega\n" with offset 1 and limit 2. Done means the returned text includes the numbered blank second line while continuation still starts at line 3, without changing behavior for larger reads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100