Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: Provider agent sessions inherit ELECTRON_RUN_AS_NODE=1 on macOS, so Electron apps launched from agent shells run as Node and exit

オープン 初心者向け
#26,966 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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
  1. On macOS, start a Claude (or Codex) thread in the desktop app.
  2. Ask the agent to run echo $ELECTRON_RUN_AS_NODE with its shell tool. It prints 1.
  3. 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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。