Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Claude provider check crashes on a non-string argument-hint in a skill (value.trim is not a function) #49568

Openjtmilne(GitHub profile, opens in a new tab) opened this issue 1 comment

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. Create ~/.claude/skills/test-skill/SKILL.md with this frontmatter (value unquoted):
    name: test-skill description: Repro skill argument-hint: [foo|bar]
  2. Launch T3 Code (desktop) with Claude Code installed and authenticated.
  3. Open Settings → Providers.

Real-world trigger: the claude-mem plugin (15.5.0) ships skills/backup-setup/SKILL.md with argument-hint: [setup|restore|status]. YAML parses the unquoted value as an array, not a string.

Expected behavior

The Claude provider check completes and shows Ready. At worst, the malformed command/skill entry is skipped with a warning. If the check does fail, the real error is shown in Settings.

Actual behavior

Claude stays on "Not found – Claude provider status has not been checked in this session" indefinitely. Every status check throws TypeError: value.trim is not a function in nonEmptyProbeString (called from parseClaudeInitializationCommands). The registry then logs "provider registry refresh failed; preserving cached providers", so the pending placeholder snapshot is never replaced.

The claude binary is found and runs fine. The UI message sends users looking at PATH and binary path settings, which don't help. Quoting the value (argument-hint: "[foo|bar]") and restarting fixes it.

Suggested fix: in nonEmptyProbeString, check typeof value === "string" (or join arrays); skip bad entries rather than failing the whole check; show check errors in the UI instead of the placeholder text.

Impact

Blocks work completely

Version or commit

0.1.13 (bc0f04da94f6)

Environment

macOS (Apple Silicon), T3 Code (Beta) desktop app; Claude Code native install (~/.local/bin/claude); claude-mem plugin 15.5.0

Logs or stack traces

TypeError: value.trim is not a function
    at nonEmptyProbeString (file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/server-B8LwMtOy.mjs:30791:26)
    at file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/server-B8LwMtOy.mjs:30828:24
    at Array.flatMap (<anonymous>)
    at parseClaudeInitializationCommands (file:///Applications/T3%20Code%20(Beta).app/Contents/Resources/app.asar/apps/server/dist/server-B8LwMtOy.mjs:30824:46)
    at checkClaudeProviderStatus
    at applySnapshot (.../apps/server/dist/runtimeLayer-bHa_wuNB.mjs:26761:83)
    at refreshSnapshot (.../apps/server/dist/Schema-baCD4aNO.mjs:14066:9)
    at refreshOneSource (.../apps/server/dist/runtimeLayer-bHa_wuNB.mjs:39543:211)
    at refreshAll

"provider registry refresh failed; preserving cached providers"

Screenshots, recordings, or supporting files

No response

Workaround

Quote the argument-hint value in the offending SKILL.md (e.g. argument-hint: "[setup|restore|status]") and restart T3 Code. To find candidates: grep -rnE --include='.md' '^(name|description|argument-hint):[[:space:]]([|{)' ~/.claude/plugins/cache ~/.claude/skills ~/.claude/commands

  1. jtmilne(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. @jtmilne What does claude --version print on the Mac where this happens (and does ~/.local/bin/claude --version match it, if they differ)? With Claude Code 2.1.100–2.1.337 the CLI sends argument-hint: [setup|restore|status] to T3 as the string 'setup|restore|status', so we need your exact CLI build to reproduce the array.

  3. juliusmarminge added labelsneeds more info

Sign in to join this conversation.