anomalyco / anomalyco/opencode

Bug Report: OpenCode Desktop Opens Same-Named Projects Incorrectly

Open
#42,554 1 comment 0 reactions 1 assignee View on GitHub

@Brendonovich is already working on this.

Since Aug 14, 2026.

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

Description

Summary
On the OpenCode macOS desktop client, when two projects located in different directories share the same folder name, the client consistently opens the first project that was accessed, making it impossible to switch to the other same-named project. For example, attempting to open /user/download/test-project actually activates the previously opened /user/work/test-project.

Steps to Reproduce
Create project at Path A: Create an OpenCode project at /user/work/test-project, open it, and use it for a period of time.

Create another project with the same name at Path B: Place a different project folder with the identical name test-project at /user/download/test-project.

Attempt to switch projects: Use the OpenCode desktop client to open /user/download/test-project.

Observe the error: The application continues to display /user/work/test-project, or although it may appear to load the new path, it actually reads from and operates on the old project. The issue persists after multiple attempts.

Current Behavior
OpenCode appears to use the folder name as the primary project identifier rather than the full file system path. When a project with a duplicate name is opened, the client incorrectly directs subsequent operations to the already-cached project.

Expected Behavior
OpenCode should use the complete, canonical absolute path to distinguish between projects. When a user selects a new path via "Open Project," the client should load and switch to the project at that path regardless of whether a project with the same name already exists.

Impact
This issue significantly impairs the user experience for developers managing multiple projects with the same name—such as projects checked out from different Git branches, multiple copies of the same codebase, or entirely unrelated projects that coincidentally share a name. Users cannot reliably switch between these independent projects using the desktop client.

Please let me know if you need any additional details or logs to assist in debugging this issue.

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.