Skip to content

Conversation

@code-yeongyu
Copy link
Contributor

@code-yeongyu code-yeongyu commented Dec 5, 2025

Grep tool hangs indefinitely when searching large directories like node_modules because there's no timeout.

I've been using a custom made tool called 'SafeGrep' in my personal plugin (oh-my-opencode) that has hard-limit timeout thing, but figured this would be more useful in core.

Followed Bash tool's implementation and style:

  • Add 60s default timeout (max 10min)
  • Add abort signal handling

I assumed there would be related issues, but couldn't find any. This was quite annoying in my environment so I thought it was worth fixing—but if this is just my setup or if this PR is heading in the wrong direction, I'd appreciate any feedback!

@code-yeongyu code-yeongyu marked this pull request as ready for review December 5, 2025 04:33
@code-yeongyu code-yeongyu changed the title feat(grep): add timeout support with 60s default to prevent hangs feat(grep): add timeout support with 60s default to prevent hangs when using it Dec 5, 2025
@code-yeongyu code-yeongyu changed the title feat(grep): add timeout support with 60s default to prevent hangs when using it feat(grep): add timeout support with 60s default to prevent hangs when with very big directories Dec 5, 2025
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.

1 participant