[Bug]: Integrated terminal does not set TERM_PROGRAM, breaking shell prompt and terminal detection
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- Open the integrated terminal in T3 Code on macOS.
- Run: echo "[$TERM_PROGRAM] [$TERM_PROGRAM_VERSION] [$COLORTERM]"
- Observe all three are empty.
For a practical repro, use any shell config that selects a prompt by terminal.
Minimal case:
case "$TERM_PROGRAM" in
"vscode") echo "vscode config" ;;
"ghostty") echo "ghostty config" ;;
*) echo "fallback config" ;;
esac
In every other terminal emulator this selects the correct branch.
In T3 Code it always hits the fallback, because there is nothing to match on.
Expected behavior
The integrated terminal exports TERM_PROGRAM (and ideally TERM_PROGRAM_VERSION)
into the pty environment, the way every other terminal emulator does:
| Emulator | TERM_PROGRAM |
|---|---|
| VS Code | vscode |
| Apple Terminal | Apple_Terminal |
| iTerm2 | iTerm.app |
| Ghostty | ghostty |
| WezTerm | WezTerm |
| Hyper | Hyper |
| T3 Code | (unset) |
Something like TERM_PROGRAM=t3code plus TERM_PROGRAM_VERSION=0.0.35.
Actual behavior
TERM_PROGRAM is never set, so the shell cannot tell it is running inside T3 Code.
Impact
Minor bug or occasional failure
Version or commit
main
Environment
15.7.4
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
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.
Research direction
The affected area is apps/desktop's integrated terminal and its pty environment; start by tracing where the terminal process environment is constructed. Verify that TERM_PROGRAM and TERM_PROGRAM_VERSION are present with the intended values by repeating the issue's echo command on macOS, and confirm shell prompt and terminal detection select the T3 Code branch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100