Skip to content

fix: grep and glob tools usage without path param under Opencode Desktop#1393

Merged
code-yeongyu merged 1 commit intocode-yeongyu:devfrom
ualtinok:dev
Feb 4, 2026
Merged

fix: grep and glob tools usage without path param under Opencode Desktop#1393
code-yeongyu merged 1 commit intocode-yeongyu:devfrom
ualtinok:dev

Conversation

@ualtinok
Copy link
Contributor

@ualtinok ualtinok commented Feb 2, 2026

Fixes grep and glob tools usage without path param under Opencode Desktop

Summary

Grep and Glob now uses ctx.directory when no path data is given. In OpenCode Desktop, the cwd is "/" when run via Finder or Dock, this causes the tools to run under "/" instead of the project directory. This small change fixes the problem as opencode pushed changes so that ctx receives the correct directory now (via Instance.directory)

Related Issues

#658
#588

-- also probably from opencode
anomalyco/opencode#7143


Summary by cubic

Fixes grep and glob running under “/” in OpenCode Desktop by defaulting the search path to ctx.directory when no path is provided. Searches now run in the project directory even when Desktop launches with cwd set to “/”.

Written for commit 527c21e. Summary will update on new commits.

…ectory. OpenCode Desktop might not send path as a param and cwd might resolve to "/"
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@ualtinok ualtinok changed the title Fixes grep and glob tools usage without path param under Opencode Desktop fix: grep and glob tools usage without path param under Opencode Desktop Feb 2, 2026
@ualtinok
Copy link
Contributor Author

ualtinok commented Feb 3, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Feb 3, 2026
leoisadev1 pushed a commit to leoisadev1/oh-my-opencode that referenced this pull request Feb 3, 2026
@code-yeongyu code-yeongyu merged commit 5dabb8a into code-yeongyu:dev Feb 4, 2026
2 of 3 checks passed
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.

2 participants