Before submitting#
Area#
apps/desktop
Steps to reproduce#
- Install T3 Code via AppImage on Ubuntu 26.04 (technically 25.10+ or any Linux distro using uutils/coreutils as the system default)
- Use zsh as your shell
- Open the integrated terminal
Expected behavior#
The integrated terminal opens with no errors.
Actual behavior#
The terminal starts up with a collection of crashes from core utility functions
Impact#
Major degradation or frequent failure
Version or commit#
0.0.21
Environment#
Ubuntu 25.10+, zsh, T3 Code AppImage
Logs or stack traces#
Security violation: Requested utility `T3-Code-0.0.21-x86_64_8927ef5ff36264d996945c146d42b49c` does not match executable name:
/usr/lib/cargo/bin/coreutils/mkdir
Security violation: Requested utility `T3-Code-0.0.21-x86_64_8927ef5ff36264d996945c146d42b49c` does not match executable name:
/usr/lib/cargo/bin/coreutils/dircolors
Security violation: Requested utility `T3-Code-0.0.21-x86_64_8927ef5ff36264d996945c146d42b49c` does not match executable name:
/usr/lib/cargo/bin/coreutils/tee
mise ERROR T3-Code-0.0.21-x86_64_8927ef5ff36264d996945c146d42b49c.AppImage is not a valid shim. This likely means you uninstalled a tool and the shim does not point to anything. Run `mise use <TOOL>` to reinstall the tool.
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information
[ERROR]: gitstatus failed to initialize.
Screenshots, recordings, or supporting files#
No response
Workaround#
Add this to the very top of ~/.zshrc:
# T3 Code AppImage leaks ARGV0 into terminal sessions (see github.com/pingdotgg/t3code/issues/2509)
unset ARGV0
Mechanism (for maintainers)
Dug into this with Claude Code — sharing the findings in case it helps someone fix it faster.
The AppImage runtime sets
ARGV0to the AppImage filename before launching the Electron process. T3 Code inherits this and passes it unmodified to the terminal shell (the same gap PR #44 partially addressed forPORT,ELECTRON_*, andVITE_*).zshhas a feature where an exportedARGV0is used asargv[0]for child processes it spawns. Since Ubuntu 25.10, the systemcoreutilsdefault is uutils — a Rust reimplementation — which includes an identity security check that rejects mismatchedargv[0]values and exits with code 1. This turns a silent env leak into hard crashes.The cascade:
ARGV0=T3-Code-....AppImageleaks into the terminal shellzshpasses it asargv[0]to every child process it spawns during startupdircolorsfails → oh-my-zsh can't set upLS_COLORSmkdirfails → gitstatus can't create its cache directory → can't download its daemon binary → gitstatus fails to initialisemiseshims receive the AppImage filename as their own name →misecan't identify which tool to proxy →miseerrors on every managed CLIteefails → anything piping through tee during startup breaks silentlyThe errors in the logs aren't independent — they're a chain from a single leaked variable.
Suggested fix (mirroring PR #44's approach, in
apps/server/src/terminal/Layers/NodePTY.ts):Strip
ARGV0,APPIMAGE,APPDIR, andOWDfrom the environment before spawning the terminal shell, and filter any/tmp/.mount_*entries fromPATHandLD_LIBRARY_PATH.Related: #1699 describes the same root cause with softer symptoms (wrong
PHP_BINARY) on older Ubuntu where GNU coreutils silently tolerate the badargv[0].