Repository navigation
chore(deps): bump @anthropic-ai/claude-agent-sdk to ^0.3.302 #471
Description
Summary
packages/core pinned @anthropic-ai/claude-agent-sdk at ^0.3.283. npm latest is now 0.3.302. This issue tracks bumping the floor to ^0.3.302.
Retargeted 2026-10-17. This issue originally tracked a bump to
^0.3.286. Upstream moved on while the PR was open, so the target is now 0.3.302 and #472 has been updated to match. The 0.3.284–0.3.286 notes are kept below for continuity.
Upstream changes, 0.3.287 → 0.3.302
Fourteen releases shipped in this window (0.3.297, 0.3.298, 0.3.294, 0.3.291, 0.3.289, 0.3.288 are CLI-parity only).
Breaking / behavioural
- 0.3.302 — an omitted
permissionModenow starts indefaultmode on third-party providers, with telemetry off, or on a fresh install; passpermissionMode: 'auto'to keep auto mode. Same shape as the 0.3.286 change. - 0.3.302 — fork subagents (
subagent_type: "fork") are on by default in SDK sessions, matching the terminal.run_in_backgroundis still offered;CLAUDE_CODE_FORK_SUBAGENT=0turns them off. - 0.3.300 —
thinking: { type: 'disabled' }andmaxThinkingTokens: 0now run as adaptive thinking on models that can't turn thinking off. - 0.3.300 —
updatedInputfrom PreToolUse and PermissionRequest hook callbacks is now validated like Claude's own input, and unknown keys are dropped.canUseToolis unchanged. - 0.3.300 — reverted the 0.3.292
suppressAlwaysAllowRule: trueoncanUseTooloptions for org-gated connector tools. - 0.3.295 — the SDK now passes named option values to Claude Code in the same argument as the flag (
--flag=value). - 0.3.299 —
initialize,mcp_set_serversandclaim_sessionnow refuse reserved MCP server names (__proto__,__defineGetter__, …). - 0.3.301 — the full-disk login-refresh error is now
invalid_requestrather thanauthentication_failed, withapi_error_statusnullinstead of 401.
New API
- 0.3.301 —
BUILTIN_TOOL_NAMESandLEGACY_TOOL_NAME_ALIASESexports; per-toolpermission_policy(always_ask/always_deny) on sdk-type MCP server configs;addPluginsonQuery.reloadPlugins(). - 0.3.296 —
claude_code_versionon theinitializecontrol response;autoCompactWindowonAgentDefinition. - 0.3.295 —
overageEnabledonSDKRateLimitInfo. - 0.3.292 —
agent_idon subagent messages;parent_task_id;run_id/origin.runId; typedsections/notesonListAgents;recipient_kindon SendMessage inputs. - 0.3.293 — optional
subagent_typeonbackground_tasks_changedentries. - 0.3.299 —
nextFireAton CronCreate/CronList output;property_orderonelicitation. - 0.3.290 — optional
offseton WebFetch input. - 0.3.287 — remote-session latency fields on the success result message.
Notable fixes we inherit
importSessionToStore skipping transcript rows containing U+2028/U+2029 on Node 24 and Bun (0.3.300); assistant text blocks losing citations in streamed responses (0.3.295); includePartialMessages streams never emitting message_stop on a cut/interrupted stream (0.3.287, 0.3.290); a tool call to an in-process MCP server left hanging after toggleMcpServer()/setMcpServers() (0.3.287); commands_changed arriving before init or twice at startup (0.3.287); setModel() failing while the account is at a usage limit (0.3.301); in-process SDK MCP servers named constructor/toString being dropped on SpareProcess.claim() (0.3.299); the sandbox option discarding an inline settings.sandbox block (0.3.296).
Also several new MCP payload size caps (0.3.287, 0.3.295, 0.3.296) — structuredContent, _meta and result-text truncation thresholds, with SDK-server tools generally exempt.
Impact on herdctl
Assessed as low — no adaptation required. Verified:
- Neither
permissionModedefault change reaches us.toSDKOptions(packages/core/src/runner/sdk-adapter.ts:181) always sets it (agent.permission_mode ?? "acceptEdits"), andcli-runtime.ts:241always passes--permission-mode. An agent configuredpermission_mode: defaultstill gets exactlydefault. - The 0.3.300 thinking change is inert: herdctl never sets
thinkingormaxThinkingTokensinSDKQueryOptions. - The 0.3.300
updatedInputvalidation is inert:packages/core/src/session/session-hooks.tsregisters onlyStopandPostToolUsecallbacks, not PreToolUse or PermissionRequest. - The 0.3.295
--flag=valuechange is internal to the SDK's own spawn path. herdctl's CLI runtime builds its own argv and is unaffected. - API surface is additive: diffing
sdk.d.ts,agentSdkTypes.d.ts,sdk-tools.d.ts,core.d.ts,bridge.d.tsfrom 0.3.286 → 0.3.302 shows exactly two added exports (BUILTIN_TOOL_NAMES,LEGACY_TOOL_NAME_ALIASES) and nothing removed.PermissionMode,SdkPluginConfigandSettingSourceare byte-identical. - Peer ranges unchanged:
@anthropic-ai/sdk >=0.93.0,@modelcontextprotocol/sdk ^1.29.0,zod ^4.0.0. - One runtime change to be aware of rather than fix: fork subagents default on in SDK sessions (0.3.302). herdctl's
forkSessionoption is a different thing (session forking, notsubagent_type: "fork").
Plan
- Bump
packages/core/package.jsonto^0.3.302and refreshpnpm-lock.yaml -
pnpm build/pnpm typecheck/pnpm lint/pnpm test - Changeset (patch,
@herdctl/core)
Original 0.3.284 → 0.3.286 notes
0.3.284
- Renamed skill's directory name is added to SlashCommand
aliaseswhere applicable. applied.ultracodeAvailable/applied.ultracodeRequestedadded togetSettings()output.- Fixes:
forkSession()history reading;getSessionMessages()message inclusion;{ decision: 'block' }elicitation-hook handling; stdin closure on follow-up turns.
0.3.285
- Optional
read.titleon the Artifact tool's structured read result. provider_not_allowedadded tostartup_failure_reason;allowedProvidersadded to theSettingstype.- Fixes: sessions with
CLAUDE_CODE_FORK_SUBAGENT=1; subagent Agent call execution;getSessionMessages()including messages sent while Claude is processing;toggleMcpServer()andrewind_conversationbehaviour.
0.3.286
- Breaking: the SDK no longer sends a default
permissionMode; Claude Code picks the starting mode frompermissions.defaultMode, else'auto'. - New
sdk_mcp_manifests_parkedresponse field,sdk_mcp_manifests/sdk_mcp_tools_list_changedcapabilities,sdkMcpServerManifestsOrigin. createSdkMcpServernow drops an unconvertible-schema tool with aCLAUDE_SDK_MCP_TOOL_SCHEMA_UNCONVERTIBLEwarning instead of breaking the server.- Priority
nowmessages background running shell commands, agents and MCP calls. NonNullableUsageexemptsfallback_credit.
Activity
chore(deps): retarget claude-agent-sdk bump to ^0.3.302
[-]chore(deps): bump @anthropic-ai/claude-agent-sdk to ^0.3.286[/-][+]chore(deps): bump @anthropic-ai/claude-agent-sdk to ^0.3.302[/+]