[Bug]: Claude version probe drops CLI stderr, so a broken wrapper shows only "installed but failed to run"
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ệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Bắt đầu tại apps/server/src/provider/ClaudeProvider.ts, gần phần kiểm tra phiên bản ở dòng 562–582. Đọc cách phần kiểm tra xử lý các lần thoát có mã khác không và cách tạo cảnh báo cùng thông báo trạng thái hiển thị cho người dùng; issue cung cấp một lệnh wrapper bị lỗi và stderr của lệnh đó để tái hiện vấn đề. Hoàn tất khi phần kiểm tra giữ lại và hiển thị chi tiết lỗi hữu ích, đồng thời vẫn có thông báo dự phòng, và các bước kiểm tra provider liên quan đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Area
apps/server
Steps to reproduce
- Install the Claude CLI wrapper so its postinstall never runs, leaving the placeholder stub it ships with:
npm i -g --ignore-scripts @anthropic-ai/[email protected] - Confirm the CLI fails and explains why:
$ claude --version; echo "exit=$?" Error: claude native binary not installed. Either postinstall did not run (--ignore-scripts, some pnpm configs) or the platform-native optional dependency was not downloaded (--omit=optional). Run the postinstall manually (adjust path for local vs global install): node node_modules/@anthropic-ai/claude-code/install.cjs Or reinstall without --ignore-scripts / --omit=optional. exit=1 - In T3 Code go to Settings → Providers and refresh the probe (the control next to "Checked just now", i.e.
server.refreshProviders).
Expected behavior
The provider card and/or the server log carry the CLI's own explanation, at least the first stderr line. The failing CLI already prints the exact fix command, and T3 has that text in hand.
Actual behavior
The card shows only:
Unavailable · Claude Agent CLI is installed but failed to run.
The only record is this warning, which keeps lengths and throws the text away (apps/server/src/provider/ClaudeProvider.ts:565-569):
{
"name": "checkClaudeProviderStatus",
"events": [
{
"name": "[\n \"Claude Agent CLI version probe exited with a non-zero status.\",\n {\n \"exitCode\": 1,\n \"stdoutLength\": 0,\n \"stderrLength\": 383\n }\n]",
"attributes": { "effect.logLevel": "WARN" }
}
]
}
Those 383 bytes of stderr were the message quoted in step 2. Since only the length is persisted, no UI surface can recover the cause afterwards. The user-facing message is hardcoded at :580.
Impact
Minor bug or occasional failure
Justification: once a wrapper install is broken, the provider is unusable and the report offers no path to recovery. Every wrapper breakage lands here identically — pnpm installs, --omit=optional, and Chocolatey-style installs as in #22810.
Version or commit
0.1.2-nightly.20261021.3473. Still present on main: apps/server/src/provider/ClaudeProvider.ts:562-582.
Environment
WSL2, Ubuntu 24.04.5 LTS (kernel 6.18.33.2-microsoft-standard-WSL2), Node v24.21.0 via fnm, @anthropic-ai/claude-code 2.1.306 (npm global). T3 host is the WSL distro (Settings header renders "on wsl"). Provider: Claude (claudeAgent); Codex and OpenCode were unaffected on the same host.
Logs or stack traces
$ grep -h "version probe exited" ~/.t3/userdata/logs/server.trace.ndjson | tail -1
{"type":"effect-span","name":"checkClaudeProviderStatus","durationMs":14.466428,"events":[{"name":"[\n \"Claude Agent CLI version probe exited with a non-zero status.\",\n {\n \"exitCode\": 1,\n \"stdoutLength\": 0,\n \"stderrLength\": 383\n }\n]","attributes":{"effect.logLevel":"WARN"}}]}
Workaround
Run the wrapper's postinstall by hand, then refresh the provider probe:
node "$(npm root -g)/@anthropic-ai/claude-code/install.cjs"
The provider flips to Available once claude --version exits 0. This is restating step 2's own advice, which T3 discarded.
Suggested fix
if (version.code !== 0) {
const detail = firstNonEmptyLine(version.stderr) || firstNonEmptyLine(version.stdout);
yield* Effect.logWarning("Claude Agent CLI version probe exited with a non-zero status.", {
exitCode: version.code,
stderr: truncate(version.stderr, 2000), // keep the text, not just its length
});
// message: detail
// ? `Claude Agent CLI is installed but failed to run: ${detail}`
// : "Claude Agent CLI is installed but failed to run.",
}
Same class of problem as #19571 (closed), which fixed stderr being dropped for turns. The availability probe was not covered by that fix.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 3 giờ 39 phút
- Pull request đã merge (30 ngày)
- 301
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
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/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#22819 · 2 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 77/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 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: open project shortcutĐang mởbug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/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ự
-
[BUG] rag: sentence content can cross the reported sentence boundariesCó thể đã có người làm @LJK-ikun đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URIĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
platformatic/mcp#361 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
frontend
Độ 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
-
Push: sem service worker ou sem VAPID, o interruptor de Notificações fica ligado sem avisar nadaĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melgarafael/DeskcommCRM#3164 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛[BUG] ProList 设置 scroll 属性无效Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ant-design/pro-components#9769 ·
Maintainer thường phản hồi trong vòng 1 ngày