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
This commit is contained in:
committed by
Ralph Khreish
parent
781b8ef2af
commit
89335578ff
8
.changeset/quiet-owls-fix-cli-sdk.md
Normal file
8
.changeset/quiet-owls-fix-cli-sdk.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"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.
|
||||
|
||||
Reference in New Issue
Block a user