Claude Agent SDK 0.2.160: background wait ceiling, Sume video job
Claude Agent SDK Python 0.2.160 keeps stdin open until background subagents go idle, ten minutes by default. Why a Sume video job can outlast that.

Claude Agent SDK for Python v0.2.160 (2026-09-25) fixed follow-up turns failing after background subagents when query() used hooks, can_use_tool or SDK MCP servers. It now keeps stdin open until the work goes idle, bounded by CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS, which defaults to 10 minutes.
A Sume video job can run longer than that ceiling, so design the agent to hold job ids and re-check them rather than assume the session outlasts the job.
What the release fixes
Before the fix, a follow-up turn after a background subagent could fail in the configurations listed above. The SDK now waits for background work to finish before closing the input stream, up to the ceiling.
At a glance
| Limit | Value | Owner |
|---|---|---|
| CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS default | 10 minutes | Claude Agent SDK Python |
| jobs_wait slice | at most 55 seconds | Sume |
| Job ids per jobs_wait | 20 | Sume |
| Job lifetime after session ends | continues and bills | Sume |
What happens to a Sume job at the ceiling
Sume jobs are server-side. If the session ends while a job is pending, the job keeps running and keeps being billed. Nothing in the SDK cancels it.
So the loop to build is: create once with an idempotency_key, store the job id, call jobs_wait in 45 to 55 second slices, and cancel explicitly if you no longer want the result.
- Raise the ceiling only if you intend to wait in-process.
- Persist job ids outside the session.
- Use max_spend_usd on the create call so a forgotten job has a bounded cost.
Limits and what is not verified
The release notes do not describe how the ceiling interacts with SDK MCP servers beyond the fix. I did not benchmark a full video job against the 10-minute default.
Sources
Related posts
More in Developers
- Claude Code 2.1.288 hooks fail closed: a Sume spend guard script
Claude Code 2.1.288 now blocks a tool call when a PreToolUse hook can't match or serialize input. A small guard script for Sume paid calls.
- allowManagedModsOnly in Claude Code: does hosted Sume MCP still load?
allowManagedModsOnly keeps users' own Claude Code mods from loading. What it leaves alone, how a policy mod reviews the rest, and the Sume MCP connection.
- Claude Code .mcp.json oauth.scopes: mcp:read first, mcp:write later
Claude Code's .mcp.json oauth block takes a space-separated scopes string that overrides discovery. Start Sume at mcp:read and widen to mcp:write when needed.
- Claude Code mod: stop paid Sume calls after N in a session
Write a Claude Code mod that counts paid Sume MCP calls with a tool.call hook, denies call N+1, and fails closed. Code, matcher, and what it cannot cap.
Written by Sume