[Bug]: Provider agent sessions inherit ELECTRON_RUN_AS_NODE=1 on macOS, so Electron apps launched from agent shells run as Node and exit
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- electron, macos, typescript
- Ambito
- backend
Direzione di ricerca
Inizia da mergeProviderInstanceEnvironment e dagli adattatori di sessione del provider in apps/server; secondo l’issue, creano gli ambienti di sessione tramite questo helper. Confronta questo percorso con TERMINAL_ENV_BLOCKLIST in apps/server/src/terminal/Manager.ts e con la gestione dell’ambiente esistente descritta nell’issue. Il lavoro è completo quando le shell del provider non ereditano più ELECTRON_RUN_AS_NODE, mentre gli helper che necessitano della modalità Node possono ancora impostarlo autonomamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- On macOS, start a Claude (or Codex) thread in the desktop app.
- Ask the agent to run
echo $ELECTRON_RUN_AS_NODEwith its shell tool. It prints1. - Ask it to launch any Electron app from that shell, for example
/Applications/Slack.app/Contents/MacOS/Slack --remote-debugging-port=9222.
Expected behavior
Agent shells don't have ELECTRON_RUN_AS_NODE, so an Electron app launched from one opens normally.
Actual behavior
The Electron app starts as plain Node and exits without opening a window. Agents that drive desktop apps over CDP (Slack, VS Code, Discord, etc.) can't start them.
The desktop app starts the server with ELECTRON_RUN_AS_NODE=1 on purpose (apps/desktop/src/backend/DesktopBackendConfiguration.ts), and mergeProviderInstanceEnvironment passes it through unchanged to provider sessions, so every tool shell inherits it. The integrated terminal (TERMINAL_ENV_BLOCKLIST in apps/server/src/terminal/Manager.ts) and the external launcher (#20206) already drop it; provider sessions are the remaining path.
This is the provider-session part of #16456, which was closed with a request for a new issue covering only that part. It isn't Linux-specific: the same leak happens on macOS without any AppImage variables.
#16679 (maintainer takeover) fixes this: its mergeProviderInstanceEnvironment deletes ELECTRON_RUN_AS_NODE on every platform before applying provider overrides, and Claude, Codex, Grok, Antigravity and the ACP registry adapters all build their session environment through it. T3's own helpers that need Node mode (agent-device wrappers since #18301, the Claude history worker, document text extraction) set the variable themselves, so they're unaffected.
Impact
Major degradation or frequent failure
Version or commit
T3 Code (Nightly) 0.1.5-nightly.20261029.3877; code references are upstream/main at 20497e4890.
Environment
macOS 27 (Apple Silicon), desktop app, Claude provider. Same code path for Codex.
Logs or stack traces
$ echo "ELECTRON_RUN_AS_NODE=${ELECTRON_RUN_AS_NODE-<unset>}" # inside a Claude agent's Bash tool
ELECTRON_RUN_AS_NODE=1
Workaround
Prefix the launch with env -u ELECTRON_RUN_AS_NODE, or unset ELECTRON_RUN_AS_NODE in the agent's shell first.
- Lingua principale
- TypeScript
- Stelle
- 24.8k
- Fork
- 6.4k
- Merge medio
- 7h 39m
- PR unite (30g)
- 123
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pingdotgg/t3code
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
pingdotgg/t3code#30228 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: ACP sign-in replaces the agent's error message with a generic oneForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pingdotgg/t3code
Issue simili
-
area: frontend priority: normal
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
formbricks/formbricks#9918 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
thecodacus/pithagoras#364 ·
I maintainer di solito rispondono entro 1 giorno
-
TestAutonomousStop_ReportsObservedState fails under host load: 1s wall-clock ceiling vs 250ms cycleApertatype:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nightgauge/nightgauge#2909 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno