anomalyco / anomalyco/opencode
Integrated terminal leaks ARGV0 to shell, breaking rustup/cargo on Linux AppImage
@Brendonovich is already working on this.
Since Aug 6, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Environment
- OpenCode Desktop: 1.18.11
- Platform: Linux
- Distribution: CachyOS (likely affects any Linux distribution)
- Installation: AppImage
Description
The integrated terminal inherits the ARGV0 environment variable from the AppImage launcher.
This causes rustup to misidentify itself and breaks all Rust proxy tools (cargo, rustc, rustfmt, cargo clippy, etc.) with the following error:
error: unknown proxy name: 'ai-opencode-desktop'; valid proxy names are 'rustc', 'rustdoc', 'cargo', ...
Steps to reproduce
- Launch OpenCode Desktop (AppImage).
- Open the integrated terminal.
- Run:
echo "$ARGV0"
Output:
/home/<user>/.local/share/bin/ai-opencode-desktop.AppImage
- Run:
cargo --version
Result:
error: unknown proxy name: 'ai-opencode-desktop'
Expected behavior
The integrated terminal should not propagate ARGV0 from the AppImage launcher into child shell sessions, as it breaks applications (such as rustup) that intentionally inspect this variable.
Running cargo --version should simply output the Cargo version.
Workaround
unset ARGV0
cargo --version
After unsetting ARGV0, Cargo and the rest of the Rust toolchain work normally.
Additional information
This appears to be the same class of issue previously seen in other Electron-based applications where ARGV0 leaked into the integrated terminal environment.
Filtering or unsetting ARGV0 before spawning the integrated shell should resolve the issue.
Plugins
No response
OpenCode version
1.18.11
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.