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
Same as #2417, installed on macOS using brew. I believe this may be because .local/share already existed since I had PowerShell and uv installed, which use the same path. I used the commands posted at #2417 to fix it and that worked (had to run chown with sudo), but this is likely to happen for others as well, so perhaps it can be fixed, worked around, or documented better. A different path such as ~/.opencode may be better since it won't conflict with anything else. Otherwise, it could be added to the troubleshooting section of the site or fixed in a different way.
The issue mentions that .local/share already existed from other tools (PowerShell, uv), which caused permission conflicts. Issue #2417 has documented workarounds and solutions.
Feel free to ignore if your specific case differs from these.
Why did you have something in your home directory that your user doesn't have access to? Seems like an environmental issue.
In some companies (like mine), local workstations are managed by IT departments that sometimes lock down various directories inside the primary user's home dir (like ~/.local and ~/.cache)
Having some easy mechanism to override this to a different folder would make this tool usable for a wider audience that are operating in restricted ecosystems
Activity
github-actions commentedon Dec 29, 2025
This issue might be a duplicate of existing issues. Please check:
The issue mentions that .local/share already existed from other tools (PowerShell, uv), which caused permission conflicts. Issue #2417 has documented workarounds and solutions.
Feel free to ignore if your specific case differs from these.
fix: handle EACCES permission error when creating data directories
justfortheloveof commentedon Dec 31, 2025
Why did you have something in your home directory that your user doesn't have access to? Seems like an environmental issue.
LaiZhou commentedon Jan 5, 2026
@xboxfanj
alias opencode='XDG_STATE_HOME=$HOME/.opencode-state opencode'It works.hrivera-ntap commentedon Feb 4, 2026
In some companies (like mine), local workstations are managed by IT departments that sometimes lock down various directories inside the primary user's home dir (like ~/.local and ~/.cache)
Having some easy mechanism to override this to a different folder would make this tool usable for a wider audience that are operating in restricted ecosystems
LaiZhou commentedon Feb 5, 2026
@hrivera-ntap try
alias opencode='XDG_STATE_HOME=$HOME/.opencode-state opencode', you can use XDG_STATE_HOME.hrivera-ntap commentedon Feb 28, 2026
Thanks LaiZhou,
Though i needed to do the following XDG_* variables to get it to work: