Summary
Bump @anthropic-ai/claude-agent-sdk in packages/core from ^0.1.0 (resolves 0.1.77) to ^0.3.x (latest 0.3.205). The pinned ^0.1.0 range cannot cross 0.x minors, so herdctl is frozen on a stale SDK line whose bundled harness lacks the current agentic toolset (ScheduleWakeup, ToolSearch, Cron*, Monitor, …). This is the root cause of a real cross-turn-autonomy failure for consumers running long-lived chat agents (e.g. Paddock keepers): an agent that schedules a wakeup or a background task to "continue later" is never re-invoked.
packages/core/package.json:21:
"@anthropic-ai/claude-agent-sdk": "^0.1.0",
Why it matters (evidence)
Root-caused why a keeper's "schedule a wakeup / continue later" never fires:
- 0.1.x bundles its own JS
cli.js harness — grep of the installed 0.1.77 cli.js: 0 ScheduleWakeup refs. So the SDK runtime's openSession() hands the agent a harness that doesn't even contain the tool.
- System
claude 2.1.199 (what the CLI runtime spawns): 9 ScheduleWakeup refs — the tool exists, but the CLI runtime runs it one-shot (claude -p, print-and-exit), so a wakeup timer has no live process to fire in.
- 0.3.x changed architecture: it drops the bundled JS harness and instead extracts/runs the native Claude Code
2.1.205 binary (per its manifest.json, linux-x64 ~257 MB) — the same 2.1.x line that has the agentic tools.
Empirical confirmation (reproducible): installed claude-agent-sdk@0.3.205, drove a persistent streaming query() (the openSession() path), had the agent call ScheduleWakeup(delaySeconds: 60), then held the session open and idle. The harness re-invoked the same session at the scheduled time and did real work:
tools=34 (ScheduleWakeup loaded via ToolSearch)
RESULT #1 → turn ends, session idle
… ~83s idle, one live streaming process, no input …
system/init (SAME session id) → TOOL_USE Bash → file written → ASSISTANT: WOKE → RESULT #2
VERDICT: wake fired during idle ✅
The identical test against 0.1.77: ScheduleWakeup / ToolSearch are not available to the agent at all.
Scope / risk
Not a trivial version nudge — the SDK changed substantially between 0.1 and 0.3:
- Packaging changed:
0.1.x bundled cli.js; 0.3.x ships bridge.mjs + extractFromBunfs.js + a native-binary manifest.json (extracted at runtime). Executable-resolution / startup differs.
- Verify the surface used by
runner/sdk-adapter.ts, runner/runtime/sdk-runtime.ts, and runner/runtime/message-queue.ts still typechecks and behaves: query() signature, Options (systemPrompt preset, permissionMode, allowedTools, canUseTool, cwd, includePartialMessages), and the Query control methods (interrupt, supportedCommands, setModel) + streaming-input AsyncIterable<SDKUserMessage>.
- Confirm Max-plan auth still resolves via
CLAUDE_CODE_OAUTH_TOKEN (verified working with 0.3.205 in the repro).
- Observed SDK warning on 0.3.205: bare
allowedTools entries auto-approve and shadow the canUseTool callback — relevant to per-call permission gating; use a PreToolUse hook if callback gating is required.
Downstream/consumer impact
The bump unlocks the fix but does not deliver it alone. runtime.execute() (the per-turn job path behind trigger()) still runs one query() per turn and ends when the turn's result arrives — so wakeups only survive when a consumer uses the persistent openSession() path, which is SDK-runtime-only (CLI/Docker leave openSession undefined). Consumers wanting cross-turn autonomy must (a) run the agent on runtime: "sdk" and (b) drive turns through openChatSession / openSession, not one-shot trigger(). (Tracked separately on the Paddock side.)
Acceptance criteria
Summary
Bump
@anthropic-ai/claude-agent-sdkinpackages/corefrom^0.1.0(resolves 0.1.77) to^0.3.x(latest 0.3.205). The pinned^0.1.0range cannot cross0.xminors, so herdctl is frozen on a stale SDK line whose bundled harness lacks the current agentic toolset (ScheduleWakeup,ToolSearch,Cron*,Monitor, …). This is the root cause of a real cross-turn-autonomy failure for consumers running long-lived chat agents (e.g. Paddock keepers): an agent that schedules a wakeup or a background task to "continue later" is never re-invoked.packages/core/package.json:21:Why it matters (evidence)
Root-caused why a keeper's "schedule a wakeup / continue later" never fires:
cli.jsharness — grep of the installed0.1.77cli.js: 0ScheduleWakeuprefs. So the SDK runtime'sopenSession()hands the agent a harness that doesn't even contain the tool.claude2.1.199 (what the CLI runtime spawns): 9ScheduleWakeuprefs — the tool exists, but the CLI runtime runs it one-shot (claude -p, print-and-exit), so a wakeup timer has no live process to fire in.2.1.205binary (per itsmanifest.json,linux-x64~257 MB) — the same 2.1.x line that has the agentic tools.Empirical confirmation (reproducible): installed
claude-agent-sdk@0.3.205, drove a persistent streamingquery()(theopenSession()path), had the agent callScheduleWakeup(delaySeconds: 60), then held the session open and idle. The harness re-invoked the same session at the scheduled time and did real work:The identical test against
0.1.77:ScheduleWakeup/ToolSearchare not available to the agent at all.Scope / risk
Not a trivial version nudge — the SDK changed substantially between
0.1and0.3:0.1.xbundledcli.js;0.3.xshipsbridge.mjs+extractFromBunfs.js+ a native-binarymanifest.json(extracted at runtime). Executable-resolution / startup differs.runner/sdk-adapter.ts,runner/runtime/sdk-runtime.ts, andrunner/runtime/message-queue.tsstill typechecks and behaves:query()signature,Options(systemPromptpreset,permissionMode,allowedTools,canUseTool,cwd,includePartialMessages), and theQuerycontrol methods (interrupt,supportedCommands,setModel) + streaming-inputAsyncIterable<SDKUserMessage>.CLAUDE_CODE_OAUTH_TOKEN(verified working with 0.3.205 in the repro).allowedToolsentries auto-approve and shadow thecanUseToolcallback — relevant to per-call permission gating; use aPreToolUsehook if callback gating is required.Downstream/consumer impact
The bump unlocks the fix but does not deliver it alone.
runtime.execute()(the per-turn job path behindtrigger()) still runs onequery()per turn and ends when the turn'sresultarrives — so wakeups only survive when a consumer uses the persistentopenSession()path, which is SDK-runtime-only (CLI/Docker leaveopenSessionundefined). Consumers wanting cross-turn autonomy must (a) run the agent onruntime: "sdk"and (b) drive turns throughopenChatSession/openSession, not one-shottrigger(). (Tracked separately on the Paddock side.)Acceptance criteria
packages/coredepends on@anthropic-ai/claude-agent-sdk@^0.3.x; lockfile updated.sdk-adapter/sdk-runtime/message-queuebuild and pass tests against 0.3.x.openSession()agent schedulingScheduleWakeupand being re-invoked at fire time.RELEASING.md.