anomalyco / anomalyco/opencode

glob (V2) drops the truncation flag, model can't tell results were limited

Open
#45,910 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.