The Wire · Showcase
CLAUDE AGENT SDK FIXES STDIN CLOSURE BUG IN BACKGROUND TASKS
By RepoJournal · Filed · About Anthropic
The Python SDK's query method was prematurely closing stdin when background subagents were still in flight, breaking tool calls and silently bypassing hooks - now fixed in v0.2.127.
Claude Agent SDK v0.2.127 ships a critical fix for stdin handling in background tasks [1], addressing a bug where closing stdin too early caused SDK-MCP tool calls from background subagents to fail with stream closure errors and skip PreToolUse hooks. The fix keeps stdin open until all in-flight tasks complete and the final result frame arrives [1]. Both the Agent SDK and Claude Code are rolling forward together: v0.2.128 bundles the latest Claude CLI v2.1.220 [2], while Claude Code v2.1.219 introduces Claude Opus 5 as the default Opus model with 1M context and adds a new sandbox network allowlist setting for stricter host controls [3]. The Claude Code Action and its base syncs now track both Claude Code and Agent SDK bumps, keeping all three components in lockstep [ref:8, ref:10].
One email a day. Unsubscribe in one click.
Keep up with Anthropic in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Upgrade claude-agent-sdk to 0.2.127+ if using background tasks with subagents anthropics/claude-agent-sdk-python [immediate]
- → Update claude-code-action to v1.0.183 to get Claude Code v2.1.220 anthropics/claude-code-action [plan]
- → Review Claude Code v2.1.219 sandbox.network.strictAllowlist if running sandboxed commands anthropics/claude-code [monitor]
References
- [1] v0.2.127 ↗ anthropics/claude-agent-sdk-python
- [2] v0.2.128 ↗ anthropics/claude-agent-sdk-python
- [3] v2.1.219 ↗ anthropics/claude-code
- [4] chore: bump Claude Code to 2.1.220 and Agent SDK to 0.3.220 anthropics/claude-code-action
- [5] Sync from claude-code-action base-action@be7b93b anthropics/claude-code-base-action