Zed prevent_idle_sleep for agent threads and Sume jobs_wait
Zed 1.21 keeps your machine awake while agent threads run. A sleeping laptop is not a cancelled Sume job: jobs keep billing, so resume with jobs_wait.

Zed's agent.prevent_idle_sleep setting, on by default, stops idle system sleep while agent threads are running, which keeps a long Sume render from being interrupted by a sleeping laptop. Even so, a lost connection does not cancel a job: a Sume job that was already created keeps running and billing, and you read it with jobs_wait or by polling.
What Zed shipped
| Release | Item |
|---|---|
| 1.21 | agent.prevent_idle_sleep on by default, prevents idle system sleep while agent threads run |
| 1.22 | Subagent compaction and a spawn_agent model parameter |
Why it matters for video work
A generation can take longer than a thread's attention span. Without the setting, a laptop could sleep while the model waits on jobs_wait, drop the connection, and leave the thread in an uncertain state. With it, the thread continues. It only prevents idle sleep; closing the lid or a network change still breaks the call.
Connecting Zed to Sume
Zed supports remote MCP servers. Add https://mcp.sume.com/mcp with a Sume API key header, or use OAuth with mcp:read and opt-in mcp:write. Write and paid tools require idempotency_key. Under read-only, they return insufficient_scope.
jobs_waitholds at most 55 seconds per call; the default is 50.- On
wait_slice_expiredcall again with the same ids, never resubmit the create. - Batch up to 20
job_idsand useinclude_results: true.
Subagents and cost
With spawn_agent choosing a model, a subagent may call Sume too. Give each subagent a distinct idempotency_key namespace and a max_spend_usd, so parallel work cannot overspend. Remember that your plan sets concurrency: Free 1, Pro 4, Startup 8, Scale 20.
Sources
Related posts
More in Developers
- Idempotency keys for AI video APIs: retry without paying twice
An idempotency key makes a retried create return the original run or job instead of a second paid one. How Sume's Idempotency-Key works on each API.
- Signed webhooks for Sume video runs: events, retries, verification
Sume sends one HMAC-SHA256 signed POST when a Format, Action, or Agent Completion run completes or fails. Verify the raw body and dedupe on request_id.
- Spend caps for unattended AI agents: how Sume bounds each run
An unattended agent has no one to approve spend, so Sume caps generation per run: required on Agent Completions, and up to $500 on Format runs.
- Sume API errors and rate limits: codes, 429s, and when to retry
Sume API errors share one envelope with a stable code and a request id. Reads and writes have separate per-minute budgets; queue_full is not a rate limit.
Written by Sume