Skip to content

Commit 392486e

Browse files
bidahclaude
andcommitted
🔧 chore: migrate from claude-code to claude-agent-sdk package
Replace @anthropic-ai/claude-code with @anthropic-ai/claude-agent-sdk across the codebase. The package was renamed and the old import path was causing "ERR_MODULE_NOT_FOUND" errors in the E2B sandbox executor. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 93dafdb commit 392486e

8 files changed

Lines changed: 82 additions & 25 deletions

File tree

‎apps/web/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@ai-sdk/openai": "^1.3.22",
3737
"@ai-sdk/react": "1.2.11",
3838
"@ai-sdk/ui-utils": "^1.2.11",
39-
"@anthropic-ai/claude-code": "^1.0.31",
39+
"@anthropic-ai/claude-agent-sdk": "^0.1.9",
4040
"@better-auth/expo": "^1.3.28",
4141
"@deepgram/sdk": "^4.9.1",
4242
"@e2b/code-interpreter": "2.1.0",

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@ai-sdk/openai": "^1.3.22",
4444
"@ai-sdk/react": "1.2.11",
4545
"@ai-sdk/ui-utils": "^1.2.11",
46-
"@anthropic-ai/claude-code": "^1.0.31",
46+
"@anthropic-ai/claude-agent-sdk": "^0.1.9",
4747
"@better-auth/expo": "^1.3.28",
4848
"@deepgram/sdk": "^4.9.1",
4949
"@e2b/code-interpreter": "2.1.0",

‎packages/agent/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"access": "public"
4949
},
5050
"dependencies": {
51-
"@anthropic-ai/claude-code": "^1.0.31"
51+
"@anthropic-ai/claude-agent-sdk": "^0.1.9"
5252
},
5353
"devDependencies": {
5454
"@react-native-vibe-code/tsconfig": "workspace:*",

‎packages/agent/src/executor.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { query, type SDKMessage } from '@anthropic-ai/claude-code'
1+
import { query, type SDKMessage } from '@anthropic-ai/claude-agent-sdk'
22
import * as fs from 'fs'
33
import * as path from 'path'
44
import { downloadImage } from './utils/download-image.js'
@@ -126,8 +126,8 @@ export async function runExecutor(
126126
permissionMode: 'bypassPermissions',
127127
// Load skills from filesystem - required for Agent Skills to work
128128
settingSources: ['user', 'project'],
129-
// Enable Skill tool (required for Skills to be invoked)
130-
allowedTools: ['Skill'],
129+
// Enable file manipulation tools plus Skill for user-defined skills
130+
// allowedTools: ['Read', 'Write', 'Edit', 'Glob', 'Grep', 'Bash', 'Skill'],
131131
// Pass model selection if provided
132132
...(args.model && { model: args.model }),
133133
// Add hooks if configured

‎packages/agent/src/types.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { SDKMessage } from '@anthropic-ai/claude-code'
1+
import type { SDKMessage } from '@anthropic-ai/claude-agent-sdk'
22

33
/**
44
* Arguments passed to the agent executor via CLI

‎packages/sandbox/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"@react-native-vibe-code/error-manager": "workspace:*",
6262
"@react-native-vibe-code/ui": "workspace:*",
6363
"@e2b/code-interpreter": "2.1.0",
64-
"@anthropic-ai/claude-code": "^1.0.31",
64+
"@anthropic-ai/claude-agent-sdk": "^0.1.9",
6565
"@octokit/rest": "^22.0.0",
6666
"@vercel/blob": "^2.0.0",
6767
"cloudflare": "^5.2.0",

‎packages/sandbox/templates/expo-template/claude-executor.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ async function run() {
230230
? { type: 'preset' as const, preset: 'claude_code' as const, append: systemPrompt }
231231
: { type: 'preset' as const, preset: 'claude_code' as const },
232232
settingSources: ['user', 'project'],
233-
allowedTools: ['Skill'],
233+
// Allow all file manipulation tools plus Skill for user-defined skills
234+
// allowedTools: ['Read', 'Write', 'Edit', 'Glob', 'Grep', 'Bash', 'Skill'],
234235
...(model && { model }),
235236
hooks: {
236237
SessionEnd: [{ hooks: [sessionEndHook] }],

‎pnpm-lock.yaml‎

Lines changed: 72 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)