You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
desktop: project picker can't switch from a nested project to its parent project #58524
In the desktop app, when a project nested inside another project's directory is selected (e.g. ~/Code/Monorepo/apps/Nested), the project dropdown under the new-session prompt box can't switch to the parent project (~/Code/Monorepo). The selection stays on the nested project. Restarting the app shows the parent project correctly.
Environment
opencode version: 2.1.4 (desktop app)
OS: Darwin 27.0.0 (macOS, arm64)
Terminal: Unavailable: desktop app, not run from a terminal
Shell: /bin/zsh
Install/channel: latest
Active plugins: Unavailable: custom plugins are installed, but none looks related to project selection
Reproduction
Have two projects, where one's directory is inside the other's:
Monorepo at ~/Code/Monorepo (the monorepo root)
Nested at ~/Code/Monorepo/apps/Nested (a folder inside it)
Select Nested as the current project.
On the new session screen, open the project dropdown under the prompt box and choose Monorepo.
The selection stays on Nested.
Restart the app. Monorepo is now shown correctly.
Expected Behavior
Choosing Monorepo in the dropdown switches the new-session view to Monorepo.
Actual Behavior
The dropdown stays on Nested. There is no error. The switch only takes effect after an app restart.
Additional Context
Only the nested-to-parent direction fails. Switching from Monorepo to Nested works.
Switching between other projects that are not nested in each other works.
It is consistently reproducible.
This looks like a path-containment check. The selected directory is probably resolved back to the nested project, or the parent is matched to the child because its path is a prefix of the child's path.
Closing as a probable duplicate or related to #55351, #54034 or #51191. Nested lives inside the Monorepo git repo, so it likely resolves to the same project and hits the same project-chip resolver bug described there.
Thanks for the detailed report! I couldn't reproduce this here. I tried the web UI of 2.1.4, which shares its frontend code with the desktop app. I added Monorepo and Monorepo/apps/Nested as two projects, selected Nested, started a new session and chose Monorepo in the project dropdown under the prompt. It switched straight away, including when switching back and forth several times. It also worked when the nested folder wasn't its own git repo.
So it may be specific to the macOS desktop app, which I can't run in this environment. A maintainer with a Mac will need to check it. Some details that would help them:
Is Nested its own git repository, or just a folder inside the Monorepo repo?
Does it happen in a brand new tab, or only in a tab that was already showing Nested (for example, one restored after starting the app)?
Do either of the paths involve a symlink, or differ in letter case from how they were added?
The closest related issue I found is #51191 (sessions in a nested project folder open at the git repo root), though it's not the same problem.
Activity
JustinCodeMonkey commentedon Oct 23, 2026
Closing as a probable duplicate or related to #55351, #54034 or #51191.
Nestedlives inside theMonorepogit repo, so it likely resolves to the same project and hits the same project-chip resolver bug described there.opencode-agent commentedon Oct 23, 2026
Thanks for the detailed report! I couldn't reproduce this here. I tried the web UI of 2.1.4, which shares its frontend code with the desktop app. I added
MonorepoandMonorepo/apps/Nestedas two projects, selectedNested, started a new session and choseMonorepoin the project dropdown under the prompt. It switched straight away, including when switching back and forth several times. It also worked when the nested folder wasn't its own git repo.So it may be specific to the macOS desktop app, which I can't run in this environment. A maintainer with a Mac will need to check it. Some details that would help them:
Nestedits own git repository, or just a folder inside theMonoreporepo?Nested(for example, one restored after starting the app)?The closest related issue I found is #51191 (sessions in a nested project folder open at the git repo root), though it's not the same problem.
JustinCodeMonkey commentedon Oct 23, 2026
Nestedis not its own Git repository, just a folder inside the monorepoI'm not sure what happened but I can no longer reproduce this issue so I will close it.