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.

5 min readSume
All posts

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

Waiting limits in play, read 2026-10-03.
LimitValueOwner
CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS default10 minutesClaude Agent SDK Python
jobs_wait sliceat most 55 secondsSume
Job ids per jobs_wait20Sume
Job lifetime after session endscontinues and billsSume

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

All Developers posts

Written by Sume