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
Project icons are incorrectly inherited by new projects #9087
Project icon assignment is incorrectly inherited from an existing project instead of being independent.
I have 4 existing projects with icons assigned and several projects without icons. When I create a new project, it automatically gets the icon of the first project that has an icon assigned.
Additionally, editing or removing the icon of that first project or any new project causes all newly created projects (that inherited the icon) to update or revert together. This does not affect all projects, only:
the first project with an icon
all projects created after that point
This suggests icon inheritance or default state is incorrectly tied to the first iconized project.
Plugins
No response
OpenCode version
The icons were correctly created with versions < 1.1.23
The issue first appeared on 1.1.23
The issue still reproduces on 1.1.25
Steps to reproduce
Have multiple existing projects, with at least one project having an icon.
Create a new project.
Observe that the new project inherits the icon of the first project with an icon.
Edit or remove the icon of that first project.
Observe that all newly created projects update or revert their icon together.
I reverted back to version 1.1.21 and the problem persists.
Using 1.1.21, I was originally able to create 4 projects and assign 4 different icons successfully. I then upgraded to 1.1.23 and 1.1.25 and created additional projects; all newly created projects shared the same icon.
After reverting again to 1.1.21, those newly created projects still share the same icon, even if I edit or remove their icons.
This suggests the issue is introduced during project creation in versions >= 1.1.23, rather than being a general icon management problem.
I dug into the code and found the root cause. Project IDs are derived from the git root commit. If the working directory has no .git or the repo has no commits, opencode falls back to projectID = "global". That means all those projects share the same storage/project/global.json, so icons appear inherited and edits apply together.
My workflow often includes a single parent folder with no git repo, containing multiple subfolders, each with its own git repo (web app, Excel macro, tools, etc.). I keep them together so one opencode session can coordinate changes across all of them. Because the parent has no .git, new projects end up in "global".
Suggested fix for non‑git folders: persist a stable per‑directory project ID instead of using "global". Two possible approaches:
Use the directory name (better than global, but renames break identity).
Create a .opencode folder inside the directory that stores a generated project ID (and possibly the icon).
I strongly prefer option 2 because it keeps identity stable across renames and gives a natural place to store project‑level assets like icons.
I can reproduce this on Desktop and can confirm the behavior is identity-coupling related, not just UI rendering.
Observed:
New projects can inherit an existing icon.
Updating/removing the original icon updates inherited ones as well.
Likely cause:
Projects without a resolvable git-based identity appear to fall back to a shared/global ID, so multiple projects map to the same project storage entry.
Suggested fix direction:
Never use a shared fallback identity across distinct project paths.
Generate a per-project stable fallback ID (path-derived hash or local project metadata).
Add migration logic for existing "global"-backed entries to avoid breaking existing users.
Add regression tests:
non-git folder A and non-git folder B must produce different project IDs
Activity
stenci commentedon Jan 17, 2026
I reverted back to version 1.1.21 and the problem persists.
Using 1.1.21, I was originally able to create 4 projects and assign 4 different icons successfully. I then upgraded to 1.1.23 and 1.1.25 and created additional projects; all newly created projects shared the same icon.
After reverting again to 1.1.21, those newly created projects still share the same icon, even if I edit or remove their icons.
This suggests the issue is introduced during project creation in versions >= 1.1.23, rather than being a general icon management problem.
stenci commentedon Jan 19, 2026
I dug into the code and found the root cause. Project IDs are derived from the git root commit. If the working directory has no .git or the repo has no commits, opencode falls back to projectID = "global". That means all those projects share the same storage/project/global.json, so icons appear inherited and edits apply together.
My workflow often includes a single parent folder with no git repo, containing multiple subfolders, each with its own git repo (web app, Excel macro, tools, etc.). I keep them together so one opencode session can coordinate changes across all of them. Because the parent has no .git, new projects end up in "global".
Suggested fix for non‑git folders: persist a stable per‑directory project ID instead of using "global". Two possible approaches:
.opencodefolder inside the directory that stores a generated project ID (and possibly the icon).I strongly prefer option 2 because it keeps identity stable across renames and gives a natural place to store project‑level assets like icons.
attkri commentedon Feb 15, 2026
I can reproduce this on Desktop and can confirm the behavior is identity-coupling related, not just UI rendering.
Observed:
Likely cause:
Suggested fix direction:
Happy to help test a patch build on Windows.
attkri commentedon Feb 15, 2026
Additional reproducible scenario from Windows Desktop (likely related persistence regression):
Expected:
Regression note:
attkri commentedon Mar 6, 2026
Additional evidence from Windows Desktop vs Web UI:
I verified this is not only a backend/storage problem.
Observed:
github-actions commentedon Jul 6, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.