[Bug]: Byte-capped Read reports prefix count as whole-file total
Los mantenedores suelen responder en 1 día
@neriousy ya está trabajando en esto.
Desde el 4/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Description
The legacy Read tool reports a partial scan count as the whole-file total when it stops at the 50 KiB byte cap. For a 1,000-line file, it returns lines 1–506 with truncated: true but incorrectly reports totalLines: 507.
Steps to reproduce
- Create a file containing 1,000 lines of 100 ASCII characters each, joined by newlines without a trailing newline.
- Read it with the legacy Read tool from offset 1 with limit 2000.
- Inspect the raw tool metadata: the returned range is 1–506 and continuation starts at 507, but
totalLinesis 507 instead of an unknown total.
Expected behavior
Omit totalLines when the byte cap prevents scanning to EOF. Report the exact total after a complete scan. Returned text and continuation offsets should stay unchanged.
OpenCode version
Source checkout dev at 907b3bc518fa48e90e8ec24dd327d13eee71c36c; Bun 1.3.14 test runtime.
Operating System
Windows 11 x64.
Terminal
Git Bash; native Bun invoked through Python.
- Lenguaje dominante
- TypeScript
- Estrellas
- 212k
- Forks
- 28.1k
- Merge medio
- 8 h 49 min
- PR fusionados (30 d)
- 348
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode
-
Windows: global-project session path depends on server process drive, hides API-created sessions from desktop pickerPosiblemente ocupada @1624318455 la tomó hace 11 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[FEATURE]: Test that PermissionV2 declines pending requests when its scope closesPosiblemente ocupada @saeedahmed96 la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
EffectFlock heartbeat never refreshes, so locks held over 60 s can be brokenPosiblemente ocupada @iceteaSA la tomó hace 11 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
anomalyco/opencode#51159 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode
Issues similares
-
enhancement good first issue priority: low size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Empty label or headline exports the editor hint ("LABEL" / "Headline goes here") into the PNGAbierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
streamplace/streamplace#1351 ·
Los mantenedores suelen responder en 2 días
-
Link Checker ReportAbiertoautomated issue report
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
databendlabs/databend-docs#3511 ·
-
automated issue report
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100