anomalyco / anomalyco/opencode
glob (V2) drops the truncation flag, model can't tell results were limited
@neriousy is already working on this.
Since Aug 28, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Describe the bug
The V2 glob tool drops the truncation flag. ripgrep's glob service already discards { truncated } (it maps to result.items), and the tool returns a bare path list with no "results truncated" notice. So when a limit is passed, the model can't tell "exactly N files" from "N of many files", and will reason as if the result set is complete.
The V1 glob tool reported this (it computed truncated = files.length === limit and emitted a note).
Suggested fix
Surface a truncated marker in the glob output (or keep limit unbounded by default and document truncation when a limit is set).
Environment
- opencode version: latest dev
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.
Assessment
This issue has not been assessed yet.