[Bug]: Provider agent sessions inherit ELECTRON_RUN_AS_NODE=1 on macOS, so Electron apps launched from agent shells run as Node and exit
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- electron, macos, typescript
- 領域
- backend
調査の方向性
まず mergeProviderInstanceEnvironment と apps/server のプロバイダーセッションアダプターを確認してください。issue によると、これらはこのヘルパーを通じてセッション環境を構築します。その経路を、apps/server/src/terminal/Manager.ts の TERMINAL_ENV_BLOCKLIST および issue に記載されている既存の環境処理と比較してください。プロバイダーのシェルが ELECTRON_RUN_AS_NODE を継承しなくなり、Node モードを必要とするヘルパーは引き続き自分で設定できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 24.8k
- フォーク
- 6.4k
- 平均マージ
- 3時間 21分
- マージ済み PR(30日)
- 297
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
"Open question" banner opens an empty new thread when the child thread runs on a linked environmentオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
pingdotgg/t3code#26989 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
better-auth/better-auth#12132 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hurttlocker/o8#5112 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
webrecorder/wabac.js#386 ·
-
needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
agent-of-empires/agent-of-empires#5098 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信