[Bug]: Provider agent sessions inherit ELECTRON_RUN_AS_NODE=1 on macOS, so Electron apps launched from agent shells run as Node and exit
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- electron, macos, typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Bắt đầu với mergeProviderInstanceEnvironment và các bộ điều hợp phiên của provider trong apps/server; issue cho biết chúng tạo môi trường phiên thông qua helper này. So sánh đường đi đó với TERMINAL_ENV_BLOCKLIST trong apps/server/src/terminal/Manager.ts và cách xử lý môi trường hiện có được mô tả trong issue. Hoàn thành khi các shell của provider không còn kế thừa ELECTRON_RUN_AS_NODE, trong khi các helper cần chế độ Node vẫn có thể tự đặt biến này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 14 giờ 40 phút
- Pull request đã merge (30 ngày)
- 193
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pingdotgg/t3code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pingdotgg/t3code#27767 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Dragging a sidebar thread from the lower part of the list auto-scrolls the sidebar to the bottomCó thể đã có người làm @juliusmarminge đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#27445 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pingdotgg/t3code#27146 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
guards: accept readonly arrays (and other array-likes) in isEmpty / hasElements / safeLengthĐang mởenhancement tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
privatenumber/tsx#866 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
danielmiessler/LifeOS#2533 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
auto:producer auto:uiux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fritzprix/libr-agent#2447 ·
Maintainer thường phản hồi trong vòng 1 ngày