pingdotgg / pingdotgg/t3code

[Bug]: Integrated terminal does not set TERM_PROGRAM, breaking shell prompt and terminal detection

Open
#8,450 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
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
  1. Open the integrated terminal in T3 Code on macOS.
  2. Run: echo "[$TERM_PROGRAM] [$TERM_PROGRAM_VERSION] [$COLORTERM]"
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.