Files
claude-task-master/.changeset/quiet-owls-fix-cli-sdk.md
Ben Vargas 89335578ff fix(claude-code): prevent "Right-hand side of instanceof is not an object" when SDK missing; improve CLI stability (#1146)
* fix: handle missing @anthropic-ai/claude-code SDK gracefully

Add defensive checks to prevent "Right-hand side of 'instanceof' is not an object" errors when the optional Claude Code SDK is not installed.

Changes:
- Check if AbortError exists before using instanceof
- Check if query function exists before calling it
- Provide clear error messages when SDK is missing

This fixes the issue reported by users in v0.24.0 and v0.25.0 where Task Master would crash with instanceof errors when using the claude-code provider without the SDK installed.

* chore: bump @anthropic-ai/claude-code to ^1.0.88 and regenerate lockfile
2025-08-22 17:01:34 +02:00

438 B

task-master-ai
task-master-ai
patch

fix(claude-code): prevent crash/hang when the optional @anthropic-ai/claude-code SDK is missing by guarding AbortError instanceof checks and adding explicit SDK presence checks in doGenerate/doStream. Also bump the optional dependency to ^1.0.88 for improved export consistency.

Related to JSON truncation handling in #920; this change addresses a separate error-path crash reported in #1142.