Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.

Commit e58e7d8

Browse files
update: SDK v0.2.123 → v0.2.126 (2026-05-01)
## Version Update - Bump @anthropic-ai/claude-agent-sdk 0.2.123 → 0.2.126
1 parent 3ecd475 commit e58e7d8

12 files changed

Lines changed: 242 additions & 82 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-agent-sdk",
3-
"description": "Build autonomous AI agents with Claude Agent SDK. TypeScript v0.2.123 | Python v0.1.71. API reference for query(), hooks, subagents, MCP, permissions, sandbox, structured outputs, and sessions.",
3+
"description": "Build autonomous AI agents with Claude Agent SDK. TypeScript v0.2.126 | Python v0.1.72. API reference for query(), hooks, subagents, MCP, permissions, sandbox, structured outputs, and sessions.",
44
"version": "2.0.0",
55
"author": {
66
"name": "xiaolai"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A self-updating Claude Code skill for building AI agents with the Claude Agent SDK — covering both [TypeScript](https://github.com/anthropics/claude-agent-sdk-typescript) and [Python](https://github.com/anthropics/claude-agent-sdk-python).
44

5-
**SDK Version**: TypeScript v0.2.123 | Python v0.1.71 | **This skill is auto-updated**: 2026-04-30
5+
**SDK Version**: TypeScript v0.2.126 | Python v0.1.72 | **This skill is auto-updated**: 2026-05-01
66

77
## What It Does
88

@@ -73,7 +73,7 @@ Both SDKs wrap the Claude Code CLI and share the same core concepts, but they di
7373

7474
| | TypeScript | Python |
7575
|---|---|---|
76-
| **Version** | v0.2.123 | v0.1.71 |
76+
| **Version** | v0.2.126 | v0.1.72 |
7777
| **GitHub stars** | ~800 | ~4,800 |
7878
| **Open issues** | ~176 | ~570 |
7979
| **Release cadence** | ~daily | ~daily |

SKILL-python.md

Lines changed: 55 additions & 54 deletions
Large diffs are not rendered by default.

SKILL-typescript.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Claude Agent SDK — TypeScript Reference (v0.2.123)
1+
# Claude Agent SDK — TypeScript Reference (v0.2.126)
22

33

4-
**Package**: `@anthropic-ai/claude-agent-sdk@0.2.123`
4+
**Package**: `@anthropic-ai/claude-agent-sdk@0.2.126`
55
**Docs**: https://platform.claude.com/docs/en/agent-sdk/overview
66
**Repo**: https://github.com/anthropics/claude-agent-sdk-typescript
77
**Migration**: Renamed from `@anthropic-ai/claude-code`. See [migration guide](https://platform.claude.com/docs/en/agent-sdk/migration-guide).
@@ -534,7 +534,7 @@ await q.setMcpServers(newServersConfig); // Replace MCP servers mid-session
534534
535535
// Plugin management
536536
await q.reloadPlugins(); // Reload plugins from disk; returns { commands, agents, plugins, mcpServers, error_count }
537-
await q.getContextUsage(); // Get context window usage breakdown by category — returns SDKControlGetContextUsageResponse (v0.2.123)
537+
await q.getContextUsage(); // Get context window usage breakdown by category — returns SDKControlGetContextUsageResponse (v0.2.126)
538538
await q.readFile(path, { maxBytes?, encoding?: 'utf-8' | 'base64' }); // Read a file from the session filesystem (gated by same read-permission rules as Read tool); returns SDKControlReadFileResponse | null. Use 'base64' for binary files like images.
539539
540540
// File checkpointing (requires enableFileCheckpointing: true)
@@ -638,7 +638,7 @@ type SDKMessage =
638638
// Status & progress
639639
| SDKStatusMessage // type: 'system', subtype: 'status' — status updates (e.g., 'compacting')
640640
| SDKSessionStateChangedMessage // type: 'system', subtype: 'session_state_changed' — idle/running/requires_action
641-
| SDKAPIRetryMessage // type: 'system', subtype: 'api_retry' — transient API error being retried (v0.2.123)
641+
| SDKAPIRetryMessage // type: 'system', subtype: 'api_retry' — transient API error being retried (v0.2.126)
642642
| SDKToolProgressMessage // type: 'tool_progress' — tool execution progress with elapsed time
643643
| SDKToolUseSummaryMessage // type: 'tool_use_summary' — summary of tool usage
644644
| SDKAuthStatusMessage // type: 'auth_status' — authentication status
@@ -665,7 +665,7 @@ type SDKMessage =
665665
| SDKMirrorErrorMessage // type: 'system', subtype: 'mirror_error' — SessionStore.append() failed/timed out (batch dropped, at-most-once delivery)
666666
```
667667

668-
### SDKAPIRetryMessage (v0.2.123)
668+
### SDKAPIRetryMessage (v0.2.126)
669669

670670
```typescript
671671
{ type: 'system', subtype: 'api_retry', uuid, session_id,
@@ -2065,18 +2065,45 @@ RUN mkdir -p /app/node_modules/@anthropic-ai/claude-agent-sdk-linux-x64-musl &&
20652065
**Legacy workaround**: Downgrade to `@anthropic-ai/claude-agent-sdk@0.2.112` (last version before native binary packages).
20662066
**Note**: PR [#305](https://github.com/anthropics/claude-agent-sdk-typescript/issues/305) (pending) adds a libc probe to select the correct variant at runtime.
20672067

2068+
### #55: `skillOverrides: { "name": "off" }` blocks invocation but does not hide the skill from the model's skill listing
2069+
**Symptom**: Setting `skillOverrides: { "<name>": "off" }` (via `settings` option or `~/.claude/settings.json`) prevents the skill from running, but the skill still appears in the `<skills>` listing injected into the model's system prompt every turn. The model is told the skill exists, then gets `"Skill <name> is disabled"` when it tries to invoke it — causing confusing "I know about X but cannot use it" behavior ([#291](https://github.com/anthropics/claude-agent-sdk-typescript/issues/291))
2070+
**Cause**: The skill loader checks `skillOverrides` at invocation time but not during the listing-injection pass. The listing pass appends all discovered skills to the prompt regardless of override state.
2071+
**Impact**: Skills that should be hidden from the model's awareness (e.g., internal or dangerous skills) remain visible. The model wastes turns attempting to use disabled skills, and may behave unpredictably when invocation fails.
2072+
**Workaround**: Use the `skills` option to control visibility rather than `skillOverrides`. Pass an explicit allowlist of skill names you want the model to see and useskills not in the list are hidden from both listing and invocation:
2073+
```typescript
2074+
// WRONG — skill is still listed in model's system prompt
2075+
const q = query({
2076+
prompt: "...",
2077+
options: {
2078+
settings: { skillOverrides: { "dangerous-skill": "off" } }
2079+
}
2080+
});
2081+
2082+
// CORRECT — explicitly list only the skills the model should see
2083+
const q = query({
2084+
prompt: "...",
2085+
options: {
2086+
skills: ["allowed-skill-1", "allowed-skill-2"] // dangerous-skill not listed → invisible to model
2087+
}
2088+
});
2089+
2090+
// To disable ALL skills:
2091+
const q = query({ prompt: "...", options: { skills: [] } });
2092+
```
2093+
**Note**: `skills: []` disables the SDK's own skills context filter but the CLI may still inject built-in skills. Use `skillOverrides: { "*": "off" }` combined with an explicit `skills` allowlist for the strictest control.
2094+
20682095
---
20692096

2070-
## Changelog Highlights (v0.2.12v0.2.123)
2097+
## Changelog Highlights (v0.2.12v0.2.126)
20712098

20722099
| Version | Change |
20732100
|---------|--------|
20742101
| v0.2.105 | Fixed `error_max_structured_output_retries` being incorrectly emitted when the final retry attempt succeededvalid `structured_output` is now preserved |
20752102
| v0.2.105 | Added `system/memory_recall` event and `memory_paths` on `system/init` for SDK renderers to surface memory operations |
2076-
| v0.2.123 | `planModeInstructions` added to `SDKSessionOptions`now supported in V2 session API (`unstable_v2_createSession`, `unstable_v2_resumeSession`) |
2077-
| v0.2.123 | Added `network.allowMachLookup` sandbox option (macOS onlyallows XPC/Mach service lookups needed for Playwright, iOS Simulator, Go-based tools with MITM proxy) |
2078-
| v0.2.123 | Added `PermissionDenied` hook event (29 total as of v0.2.123) |
2079-
| v0.2.123 | Added `Query.getContextUsage()` method (context window breakdown by category); made `SDKUserMessage.session_id` optional; added `@anthropic-ai/sdk` and `@modelcontextprotocol/sdk` as explicit dependencies (fixes type-any regression) |
2103+
| v0.2.126 | `planModeInstructions` added to `SDKSessionOptions`now supported in V2 session API (`unstable_v2_createSession`, `unstable_v2_resumeSession`) |
2104+
| v0.2.126 | Added `network.allowMachLookup` sandbox option (macOS onlyallows XPC/Mach service lookups needed for Playwright, iOS Simulator, Go-based tools with MITM proxy) |
2105+
| v0.2.126 | Added `PermissionDenied` hook event (29 total as of v0.2.126) |
2106+
| v0.2.126 | Added `Query.getContextUsage()` method (context window breakdown by category); made `SDKUserMessage.session_id` optional; added `@anthropic-ai/sdk` and `@modelcontextprotocol/sdk` as explicit dependencies (fixes type-any regression) |
20802107
| v0.2.94 | Fixed MCP server child processes not being cleaned up when `query()` session endsresolves zombie process accumulation ([Known Issue #38](#38-mcp-server-processes-remain-as-zombies-after-session-ends--fixed-in-v0294)) |
20812108
| v0.2.94 | Fixed `getContextUsage()` to include agents passed via `options.agents` in the `agents` breakdown |
20822109
| v0.2.92 | Fixed file-based agents from `.claude/agents/` not being discovered as invocable subagent types (regression since v0.2.87) |
@@ -2099,4 +2126,4 @@ RUN mkdir -p /app/node_modules/@anthropic-ai/claude-agent-sdk-linux-x64-musl &&
20992126

21002127
---
21012128

2102-
**Last verified**: 2026-04-30 | **SDK version**: 0.2.123
2129+
**Last verified**: 2026-05-01 | **SDK version**: 0.2.126

SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: claude-agent-sdk
33
description: |
44
Build autonomous AI agents with Claude Agent SDK.
5-
TypeScript v0.2.123 | Python v0.1.71.
5+
TypeScript v0.2.126 | Python v0.1.72.
66
Covers: query(), hooks, subagents, MCP, permissions, sandbox,
77
structured outputs, and sessions.
88
@@ -16,7 +16,7 @@ user-invocable: true
1616

1717
| | TypeScript | Python |
1818
|---|---|---|
19-
| **Version** | v0.2.123 | v0.1.71 |
19+
| **Version** | v0.2.126 | v0.1.72 |
2020
| **Package** | `@anthropic-ai/claude-agent-sdk` | `claude-agent-sdk` (PyPI) |
2121
| **Docs** | [TypeScript SDK](https://platform.claude.com/docs/en/agent-sdk/typescript) | [Python SDK](https://platform.claude.com/docs/en/agent-sdk/python) |
2222
| **Repo** | [claude-agent-sdk-typescript](https://github.com/anthropics/claude-agent-sdk-typescript) | [claude-agent-sdk-python](https://github.com/anthropics/claude-agent-sdk-python) |

agent/state.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"typescript": {
33
"registry": {
4-
"version": "0.2.123",
4+
"version": "0.2.126",
55
"peerDependencies": {
66
"zod": "^4.0.0"
77
},
@@ -636,11 +636,11 @@
636636
}
637637
},
638638
"lastScannedIssueNumber": 236,
639-
"lastAuditedVersion": "0.2.123"
639+
"lastAuditedVersion": "0.2.126"
640640
},
641641
"python": {
642642
"registry": {
643-
"version": "0.1.71"
643+
"version": "0.1.72"
644644
},
645645
"github": {
646646
"repo": "anthropics/claude-agent-sdk-python",
@@ -1448,5 +1448,5 @@
14481448
"lastScannedIssueNumber": 776,
14491449
"lastAuditedVersion": "0.1.56"
14501450
},
1451-
"lastUpdated": "2026-04-30T08:41:57Z"
1451+
"lastUpdated": "2026-05-01T08:35:03Z"
14521452
}

reports/2026-05-01.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Daily Report — 2026-05-01
2+
3+
## Summary
4+
5+
Both SDKs received version bumps today: TypeScript v0.2.123 → v0.2.126 and Python v0.1.71 → v0.1.72. The update agent completed successfully in 124s. Research agents ran — the TypeScript agent added Known Issue #55 (`skillOverrides` fails to hide skills from the model's listing), while the Python agent applied only version reference updates. The typecheck step failed on its initial run (stale-comma false-positive in the import-check script, a recurring issue), triggering one mend pass; verification subsequently passed 28/28 checks on attempt 2. All outcomes resolved as success.
6+
7+
## Pipeline Status
8+
9+
| Step | Result | Duration | Notes |
10+
|------|--------|----------|-------|
11+
| Monitor | success | 7s | Changes detected (TS +3 patches, PY +1 patch) |
12+
| Auth | success || |
13+
| Update | success | 124s | TS v0.2.123 → v0.2.126, PY v0.1.71 → v0.1.72 |
14+
| Research (TS) | success | 542s | Added Known Issue #55 |
15+
| Research (PY) | success | 306s | Version refs updated only |
16+
| Typecheck | **failed** (recovered) | 15s | Exit code 1 — stale-comma false-positive in import check; fixed by mending |
17+
| Verify | success | 80s | 28/28 checks passed on attempt 2 (1 mend run) |
18+
| Report | running || |
19+
20+
_Outcomes (post-mend): all steps resolved success._
21+
22+
## Monitor
23+
24+
- **Changes detected**: yes
25+
- `npm_version` (TypeScript): 0.2.123 → 0.2.126 (multiple registry entries collapsed to latest)
26+
- `pypi_version` (Python): 0.1.71 → 0.1.72
27+
28+
No issue state changes or new bug issues detected.
29+
30+
## Update Agent
31+
32+
Version bumps applied:
33+
34+
| | Old | New |
35+
|---|---|---|
36+
| TypeScript SDK | v0.2.123 | v0.2.126 |
37+
| Python SDK | v0.1.71 | v0.1.72 |
38+
39+
**Files modified** (11 files):
40+
- `README.md` — version badges updated
41+
- `SKILL.md` — version refs updated
42+
- `SKILL-typescript.md` — version bumped, `SDKAPIRetryMessage` and `getContextUsage()` version tags updated to v0.2.126
43+
- `SKILL-python.md` — version bumped throughout; `AssistantMessage`, `ResultMessage`, `AgentDefinition` field version tags updated to v0.1.72; custom tools note updated to v0.1.72+; `@tool` `Annotated` parameter description updated
44+
- `rules/claude-agent-sdk-ts.md` — version ref updated to v0.2.126
45+
- `rules/claude-agent-sdk-py.md` — version ref updated
46+
- `templates/typescript/package.json` — pinned version updated
47+
- `templates/python/pyproject.toml` — pinned version updated
48+
- `.claude-plugin/plugin.json` — version ref updated
49+
- `agent/state.json` — version fields updated; `lastAuditedVersion` set to v0.2.126 (TS) and lastUpdated refreshed
50+
- `scripts/check-versions.sh` — version refs updated
51+
52+
Verification: passed 28/28 on attempt 2 after 1 mend run. No mending of functional content required — mend fixed the typecheck false-positive only.
53+
54+
## Research
55+
56+
### TypeScript Research (542s, 80 turns)
57+
58+
- **Issues evaluated**: scanned up to issue #291 and related
59+
- **New Known Issues added**: 1
60+
61+
| Issue | Title | Verdict | Reason |
62+
|-------|-------|---------|--------|
63+
| [#291](https://github.com/anthropics/claude-agent-sdk-typescript/issues/291) | `skillOverrides: { "name": "off" }` blocks invocation but does not hide skill from model's listing | **added** (KI #55) | Skill loader checks `skillOverrides` at invocation time but not during listing-injection pass; model is told skill exists then gets a "disabled" error — confusing behavior with clear workaround (`skills` allowlist option) |
64+
65+
### Python Research (306s, 90 turns)
66+
67+
- **Issues evaluated**: recent issues reviewed
68+
- **New Known Issues added**: 0
69+
- No new actionable bugs found; all changes were version reference updates cascading from the v0.1.71 → v0.1.72 bump
70+
71+
## Errors
72+
73+
### Typecheck — Exit Code 1 (recovered by mending)
74+
75+
**Last output:**
76+
```
77+
OK: query_with_tools.py — valid syntax
78+
OK: sandbox_config.py — valid syntax
79+
OK: session_management.py — valid syntax
80+
OK: structured_output.py — valid syntax
81+
OK: subagents_orchestration.py — valid syntax
82+
83+
=== Python import resolution check ===
84+
File "<string>", line 1
85+
from claude_agent_sdk import (,AgentDefinition,ClaudeAgentOptions,...
86+
^
87+
SyntaxError: invalid syntax
88+
FAIL: Some template imports don't resolve
89+
FAIL: Cannot import: (
90+
91+
=========================================
92+
Passed: 13
93+
Failed: 2
94+
=========================================
95+
96+
TEMPLATE CHECK FAILED — 2 issue(s)
97+
```
98+
99+
**Likely cause**: Stale leading comma in a generated import list in the check script — a recurring false-positive where the import-check generator produces `(,AgentDefinition,...` instead of `(AgentDefinition,...`. Not a real code defect.
100+
101+
**Resolution**: Mend agent fixed the comma in one pass (21 turns, $0.21); verify passed 28/28 on attempt 2.
102+
103+
**Suggested fix**: The import-check script should strip leading commas before eval — this false-positive has recurred across multiple days.
104+
105+
## Cost
106+
107+
| Agent | Cost | Turns |
108+
|-------|------|-------|
109+
| Update | $0.39 | 51 |
110+
| Mending (×1) | $0.21 | 21 |
111+
| Research (TS) | $1.47 | 80 |
112+
| Research (PY) | $1.78 | 90 |
113+
| Report | N/A ||
114+
| **Total** | **$3.86** | **242** |
115+
116+
## State
117+
118+
Current tracked state after today's run:
119+
120+
- **TypeScript SDK version**: v0.2.126
121+
- **Python SDK version**: v0.1.72
122+
- **Last scanned TS issue**: #236
123+
- **Last scanned PY issue**: #776
124+
- **Last audited TS version**: v0.2.126
125+
- **Last audited PY version**: v0.1.56
126+
127+
**Tracked TS issues**: 57 entries (issues #106#236 + external #4850)
128+
**Tracked PY issues**: 76 entries (issues #10#776)
129+
130+
Known Issues breakdown (from today's run):
131+
- TS KI #55 added: `skillOverrides` bypass — skill hidden from invocation but still listed in model prompt
132+
- No PY KIs added or modified today

rules/claude-agent-sdk-py.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
paths: "**/*agent*.py"
3-
description: Auto-corrections for Claude Agent SDK (Python) v0.1.71
3+
description: Auto-corrections for Claude Agent SDK (Python) v0.1.72
44
---
55

66
# Claude Agent SDK Rules (Python)
77

88
## Package
99
- Package: `claude-agent-sdk` (PyPI, NOT `anthropic-sdk-python`)
10-
- Latest: v0.1.71
10+
- Latest: v0.1.72
1111

1212
## Common Mistakes
1313

rules/claude-agent-sdk-ts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
paths: "**/*agent*.ts"
3-
description: Auto-corrections for Claude Agent SDK v0.2.123
3+
description: Auto-corrections for Claude Agent SDK v0.2.126
44
---
55

66
# Claude Agent SDK Rules
77

88
## Package
99
- Package: `@anthropic-ai/claude-agent-sdk` (NOT `@anthropic-ai/claude-code`)
10-
- Latest: v0.2.123
10+
- Latest: v0.2.126
1111

1212
## Common Mistakes
1313

scripts/check-versions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ check_package() {
3939
}
4040

4141
echo "Dependencies:"
42-
check_package "@anthropic-ai/claude-agent-sdk" "0.2.123"
42+
check_package "@anthropic-ai/claude-agent-sdk" "0.2.126"
4343
check_package "zod" "3.24.1"
4444

4545
echo ""
@@ -52,7 +52,7 @@ echo "Python Dependencies:"
5252
echo -n "Checking claude-agent-sdk (PyPI)... "
5353
if command -v pip &> /dev/null; then
5454
py_latest=$(pip index versions claude-agent-sdk 2>/dev/null | head -1 | grep -oP '\([\d.]+\)' | tr -d '()' || echo "unknown")
55-
py_current="0.1.71"
55+
py_current="0.1.72"
5656
if [ "$py_current" = "$py_latest" ]; then
5757
echo -e "${GREEN}Up to date ($py_current)${NC}"
5858
elif [ "$py_latest" = "unknown" ]; then

0 commit comments

Comments
 (0)