Claude Code routines: offset schedules and a Sume Format run

New Claude Code routine schedules start a few minutes past the hour, and unstarted runs show Failed. Key each Sume Format run to the tick so retries are safe.

4 min readSume
All posts

A Claude Code routine that kicks off a Sume Format run should derive its Idempotency-Key from the scheduled tick, not from the clock at execution time. Claude Code 2.1.283 made new routine schedules default to a few minutes past the hour, and 2.1.284 shows runs whose cloud session never started as Failed. Both mean the actual run time shifts and some ticks need a retry.

What the changelog says

Claude Code routine items (read 2026-10-02)
VersionChange
2.1.283New routine schedules default to a few minutes past the hour
2.1.284Routine runs whose cloud session never started now show Failed
2.1.282Background Bash limit 30 minutes by default, 2 hours max

Key by tick

If the key is built from execution time, a re-run of the same tick gets a new key and a second paid run. If it is built from a static string, every tick replays the first (same key and same body return the original). Build it from the schedule name and the intended tick, for example the date and hour. A retry of that tick then returns the original run.

Format runs are created with POST /v1/formats/{handle}/{slug}/runs. You can set output_schema and generation_spend_cap_usd, and a replay returns 200 with idempotency_hit: true.

Do not hold the routine open

Read the run from GET /v1/format-runs/:id/status and /result, or configure communication.webhook_url for format.run.terminal. That event carries status OK or ERROR, an outcome of ok, degraded or error, and a receipt payload. A skipped or canceled run delivers no webhook, so a routine that waits for one needs a timeout and a status read.

  • Service-account keys cannot create runs; use a key with formats:write.
  • Reading needs formats:read.
  • Background Bash is capped, so a poll loop over 2 hours would be killed.

Using hosted MCP instead

A routine can call https://mcp.sume.com/mcp. Use jobs_wait for job ids, 55 seconds per call at most. On wait_slice_expired ask again with the same ids. Never resubmit a paid create.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume