anomalyco / anomalyco/opencode

Non-Git sessions use "/" as working directory

Open
#47,198 1 comment 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Sep 4, 2026.

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

Description

Description

Using "/" as the working directory is at once surprising, dangerous, and causes LLMs to underperform (e.g. lower-powered models won't consider that / is special and just start scanning the entire filesystem for project-related files).

A prior bug report exists in https://github.com/anomalyco/opencode/issues/24694 but it was closed with no comment from the developers. Likewise a working PR was closed by a PR auto-cleanup bot, again with no comment from the developers. There appear to be many other bugs related to this design defect as well.

Plugins

Stock

OpenCode version

1.18.20

Steps to reproduce
  1. Run opencode in a directory that is not inside a GIt repository and start working in a fresh session
Screenshot and/or share link

No response

Operating System

MacOS Tahoe

Terminal

Ghostty

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.