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 app does not inherit full PATH from shell environment #15195
Commands that rely on tools installed in the user's PATH work correctly in OpenCode TUI but fail in OpenCode Desktop with "command not found" errors. The Desktop app appears to not inherit the same shell environment/PATH as the TUI. This was working in v1.2.14 and broke in v1.2.15.
Plugins
No response
OpenCode version
1.2.15 (regression from 1.2.14)
Steps to reproduce
Have a CLI tool installed and available in your normal shell PATH (e.g. uv, but any non-system binary applies).
Confirm it works in a regular terminal session.
Open OpenCode TUI (v1.2.15) in the same repo — commands using that tool succeed.
Open OpenCode Desktop (v1.2.15) in the same repo — the same commands fail with "command not found" (exit code 127).
Downgrade to v1.2.14 — Desktop works correctly again.
This issue might be a duplicate of existing issues. Please check:
Shell sessions losing $PATH value from parent shell #4968: Shell sessions losing $PATH value from parent shell — same root cause (PATH/environment not fully inherited), though that issue focuses on TUI/CLI while this one is specific to the Desktop app regression in v1.2.15.
If this is indeed a regression specific to the Desktop app introduced in v1.2.15, it may warrant staying open as a separate tracking issue.
Note that I hid some sensitive parts but they are not relevant
# UV command check in env with -h flags for al/si
Session ID: ses_366b23adeffeQCzLIA3CUvr5Kt Created: 2/26/2026, 10:35:36 AM Updated: 2/26/2026, 10:45:54 AM
User
Can you please run some uv commands using just and uv to check if the env works? Use -h for 'al' and 'si'.
If they are not working stop and tell me
Assistant (Build · gpt-5.1-codex-mini · 10.4s)
Thinking:
Preparing to run 'just' and 'uv' commands
Tool: bash
Input:
{
"command": "just al -h",
"description": "Show help for parser 'al' target"
}
Output:
cd parser && uv run src/allegati.py -h
usage: allegati.py [-h] [--max-urls MAX_URLS]
<!-- NOTE: OTHER OPTIONS HIDDEN -->
Elabora <!-- NOTE: PART OF DESCRIPTION HIDDEN --> URL
options:
-h, --help show this help message and exit
--max-urls MAX_URLS Numero massimo di URL candidate da processare
<!-- NOTE: OTHER OPTIONS HIDDEN -->
Assistant (Build · gpt-5.1-codex-mini · 8.7s)
Thinking:
Checking just si help command
Tool: bash
Input:
{
"command": "just si -h",
"description": "Show help for parser 'si' target"
}
Output:
cd parser && uv run src/sintesi.py -h
usage: sintesi.py [-h] [--max-urls MAX_URLS]
<!-- NOTE: OTHER OPTIONS HIDDEN -->
Elabora <!-- NOTE: PART OF DESCRIPTION HIDDEN --> da allegati.json
options:
-h, --help show this help message and exit
--max-urls MAX_URLS Numero massimo di elementi da processare
<!-- NOTE: OTHER OPTIONS HIDDEN -->
Assistant (Build · gpt-5.1-codex-mini · 5.1s)
Thinking:
Summarizing help command results
I'll confirm both just al -h and just si -h ran successfully and their outputs indicate the environment is working well, then provide a concise final message with a bullet list summarizing these points and mention that the user can use -h for help with these commands.
just al -h (runs uv run src/allegati.py -h) prints the parser help, so the “al” target runs and the environment is usable.
just si -h (runs uv run src/sintesi.py -h) prints the synthesis help, confirming the “si” target also works.
Everything ran successfully; no further action needed unless you want to execute a specific workflow.
User
Ok, can you please try it again now?
Assistant (Build · gpt-5.1-codex-mini · 4.5s)
Thinking:
Verifying help commands
Tool: bash
Input:
{
"command": "just al -h",
"description": "Show help for parser 'al' target"
}
Output:
cd parser && uv run src/allegati.py -h
bash: uv: command not found
error: Recipe `al` failed on line 21 with exit code 127
Assistant (Build · gpt-5.1-codex-mini · 9.7s)
Thinking:
Diagnosing missing 'uv' command error
Tool: bash
Input:
{
"command": "just si -h",
"description": "Show help for parser 'si' target"
}
Output:
cd parser && uv run src/sintesi.py -h
bash: uv: command not found
error: Recipe `si` failed on line 25 with exit code 127
Assistant (Build · gpt-5.1-codex-mini · 5.2s)
Thinking:
Summarizing command failures due to missing binary
I’m wrapping up by explaining that re-running the commands just al -h and just si -h failed because the uv command is missing from the environment. I’ll mention what we tried, the failure message, and that no further action was taken since the user requested a retry. I’ll suggest checking if uv is installed and accessible, possibly installing it via pip, and verifying the PATH setup to resolve this.
Re-ran just al -h and just si -h as requested; both now fail immediately because uv is missing (bash: uv: command not found), so neither help text can run.
Looks like uv is no longer on PATH in this shell, so the just targets can’t start; please reinstall/activate uv (or adjust your environment) before retrying, and I can re-run them once it’s available.
Justfile content
set shell := ["bash", "-c"]
# Directory di lavoro
parser := "parser"
# Comandi di default
default:
@just --list
# Esegue allegati_bandi.py
al *FLAGS:
cd {{ parser }} && uv run src/allegati.py {{ FLAGS }}
# Esegue sintesi_bandi.py
si *FLAGS:
cd {{ parser }} && uv run src/sintesi.py {{ FLAGS }}
Note that the first message was sent using the TUI and the second using Desktop v1.2.15. After that I downgraded to v1.2.14 and in the same chat I ask the agent to rerun them and they worked just fine.
Thanks for the fast reply!
I tried running source ~/.zshrc in my terminal, through OpenCode's shell, and even asked the agent itself to run source ~/.zshrc as a command — but the issue persists in all cases. Could you clarify what you mean by "and resume"? Is there a specific workflow I'm missing?
Activity
github-actions commentedon Feb 26, 2026
This issue might be a duplicate of existing issues. Please check:
If this is indeed a regression specific to the Desktop app introduced in v1.2.15, it may warrant staying open as a separate tracking issue.
Jei-sKappa commentedon Feb 26, 2026
More context
Conversation
# UV command check in env with -h flags for al/siSession ID: ses_366b23adeffeQCzLIA3CUvr5Kt
Created: 2/26/2026, 10:35:36 AM
Updated: 2/26/2026, 10:45:54 AM
User
Can you please run some uv commands using just and uv to check if the env works? Use -h for 'al' and 'si'.
If they are not working stop and tell me
Assistant (Build · gpt-5.1-codex-mini · 10.4s)
Thinking:
Preparing to run 'just' and 'uv' commands
Tool: bash
Input:
{ "command": "just al -h", "description": "Show help for parser 'al' target" }Output:
Assistant (Build · gpt-5.1-codex-mini · 8.7s)
Thinking:
Checking just si help command
Tool: bash
Input:
{ "command": "just si -h", "description": "Show help for parser 'si' target" }Output:
Assistant (Build · gpt-5.1-codex-mini · 5.1s)
Thinking:
Summarizing help command results
I'll confirm both
just al -handjust si -hran successfully and their outputs indicate the environment is working well, then provide a concise final message with a bullet list summarizing these points and mention that the user can use -h for help with these commands.just al -h(runsuv run src/allegati.py -h) prints the parser help, so the “al” target runs and the environment is usable.just si -h(runsuv run src/sintesi.py -h) prints the synthesis help, confirming the “si” target also works.Everything ran successfully; no further action needed unless you want to execute a specific workflow.
User
Ok, can you please try it again now?
Assistant (Build · gpt-5.1-codex-mini · 4.5s)
Thinking:
Verifying help commands
Tool: bash
Input:
{ "command": "just al -h", "description": "Show help for parser 'al' target" }Output:
Assistant (Build · gpt-5.1-codex-mini · 9.7s)
Thinking:
Diagnosing missing 'uv' command error
Tool: bash
Input:
{ "command": "just si -h", "description": "Show help for parser 'si' target" }Output:
Assistant (Build · gpt-5.1-codex-mini · 5.2s)
Thinking:
Summarizing command failures due to missing binary
I’m wrapping up by explaining that re-running the commands
just al -handjust si -hfailed because theuvcommand is missing from the environment. I’ll mention what we tried, the failure message, and that no further action was taken since the user requested a retry. I’ll suggest checking ifuvis installed and accessible, possibly installing it via pip, and verifying the PATH setup to resolve this.just al -handjust si -has requested; both now fail immediately becauseuvis missing (bash: uv: command not found), so neither help text can run.uvis no longer onPATHin this shell, so the just targets can’t start; please reinstall/activateuv(or adjust your environment) before retrying, and I can re-run them once it’s available.Justfile content
Note that the first message was sent using the TUI and the second using Desktop v1.2.15. After that I downgraded to v1.2.14 and in the same chat I ask the agent to rerun them and they worked just fine.
Hope those info are useful.
kbegiedza commentedon Feb 26, 2026
fast workaround:
source ~/.zshrc and resumeJei-sKappa commentedon Feb 26, 2026
Thanks for the fast reply!
I tried running
source ~/.zshrcin my terminal, through OpenCode's shell, and even asked the agent itself to runsource ~/.zshrcas a command — but the issue persists in all cases. Could you clarify what you mean by "and resume"? Is there a specific workflow I'm missing?nexxeln commentedon Feb 26, 2026
working on a fix