[Bug]: Claude version probe drops CLI stderr, so a broken wrapper shows only "installed but failed to run"
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
apps/server/src/provider/ClaudeProvider.ts の562~582行目にあるバージョン確認処理から始めてください。確認処理がゼロ以外の終了コードをどう扱うか、警告とユーザー向けステータスメッセージがどう組み立てられるかを読みます。issueには、再現用の失敗するラッパーコマンドとそのstderrが記載されています。確認処理が有用なエラー詳細を保持して表示しつつ、フォールバックメッセージも維持し、関連するproviderのチェックが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 24.8k
- フォーク
- 6.4k
- 平均マージ
- 1時間 22分
- マージ済み PR(30日)
- 18
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
MCP endpoint matches the Authorization scheme case-sensitively and logs the same reason for "absent" and "wrong scheme" (ChatGPT connector gets missing_bearer_token)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
pingdotgg/t3code#23175 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
cloudscape-design/components#5184 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
JarX-Concepts/react-native-platform-components#130 ·
メンテナーはふだん 1 日以内に返信
-
fix(api): optimize-for-web /preview outer catches miss asDecoderOutOfMemory on V8 OOM and SIGKILLオープンarea: backend bug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
snapotter-hq/SnapOtter#3773 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa ux-audit
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
linagora/twake-contacts-frontend#386 ·
メンテナーはふだん 1 日以内に返信
-
git: README should state plainly that without --repository every reachable repository is in scopeオープンdocumentation server-git v2
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
modelcontextprotocol/servers#5225 ·
メンテナーはふだん 1 日以内に返信