Skip to content

fix(glob): time out slow searches#33656

Open
lin-hongkuan wants to merge 1 commit into
anomalyco:devfrom
lin-hongkuan:glob-tool-timeout
Open

fix(glob): time out slow searches#33656
lin-hongkuan wants to merge 1 commit into
anomalyco:devfrom
lin-hongkuan:glob-tool-timeout

Conversation

@lin-hongkuan

Copy link
Copy Markdown

Issue for this PR

Closes #33541

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a 30 second timeout around the glob tool's ripgrep search. If ripgrep stalls, the tool now fails with a clear timeout error instead of leaving the tool-call fiber pending indefinitely.

The regression test mocks a stalled ripgrep glob search and advances the Effect TestClock to verify the timeout path.

How did you verify your code works?

From packages/opencode:

  • bun test test/tool/glob.test.ts
  • bun run typecheck

From the repo root:

  • git diff --check

Screenshots / recordings

N/A - not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glob tool execute has no timeout — hangs indefinitely when ripgrep scan is slow

1 participant