Skip to content

[Question] Is automatic tool calling output truncation supported? #4826

@Mushoz

Description

@Mushoz

Question

I am trying out Opencode as a potential replacement for Codex. One thing I have noticed, that sometimes the model attempts to read a huge file or runs a "glob" tool call with wildcards which result in results north of 100k tokens in a single tool call output. This negatively impacts the performance of the model, as well as cause cost issues.

Is there some configuration that I can use to automatically truncate the output of tool calls, and let the model know it's been truncated so it can adjust its tool calls to find the relevant information? It's the one thing that Codex seems to do a lot better, but other than that I am really liking opencode so far.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions