anomalyco / anomalyco/opencode

v1.18.4: Built-in Grep can leave a background child session busy forever

Open
#38,609 1 comment 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Jul 24, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

A background child session launched normally and reported busy. The provider response appears to have completed and OpenCode persisted overlapping glob and grep calls.

  • glob completed.
  • grep call call_HgwVyOTbbFn774T6LgnuVzbq remained running.
  • No grep result/error, step finish, assistant completion, child idle/error, or background-task settlement followed.
  • The parent session remained usable.

An unresolved tool prevents the child prompt loop from finishing, so the child never becomes idle and its background task cannot settle.

In v1.18.4, GrepTool appears to call the ripgrep service without forwarding ctx.abort, and no Grep-specific timeout is visible:
https://github.com/anomalyco/opencode/blob/v1.18.4/packages/opencode/src/tool/grep.ts

I have not established whether the unresolved boundary is ripgrep itself, output handling, or tool-result finalization.

Expected: built-in Grep should return a result or explicit error, honor cancellation, have a bounded failure path, emit terminal session state, and allow a background child to settle.

Related: #22139, #23891, #10832/#10833, #36804.

Plugins

oh-my-opencode-slim v2.2.8

OpenCode version

v1.18.4

Steps to reproduce
  1. Enable OpenCode background subagents.
  2. Launch a background child that performs built-in grep and glob searches.
  3. Use a broad local search root and observe child tool/session events.
  4. In my case, Glob completed while Grep remained running; no child terminal event followed.
Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

PowerShell 7 / OpenCode desktop bundled CLI

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.