Developers

Sume agent run errors: action_run_in_progress, agent_run_not_found

409 action_run_in_progress means a schedule run is already active and you sent reject. 404 agent_run_not_found means the id is not your Agent Completion run.

5 min readSume
All posts

409 action_run_in_progress means a Sume schedule already has an active run and your trigger set on_active_run: "reject", so no run was recorded. 404 agent_run_not_found means the id sent to /v1/agent-runs is unknown, belongs to another account, or is an Action or Format run id, which never resolves there.

Codes are from the Scheduled API trigger and Runs and results pages and Agent Completions, read 2026-09-26. The shared envelope and rate limits are in Sume API errors and rate limits.

Which errors can starting a scheduled run return?

The trigger, POST /v1/actions/{action_id}/runs or its {handle}/{slug} vanity path, needs an active schedule with api_trigger_enabled: true and a key with actions:read and actions:write. A 429 means back off.

From Advanced: run a schedule via API, read 2026-09-26.
StatusCodeCauseFix
400output_schema_invalidSchema outside the strict subset; details.violations[] names each rule.Fix the schema.
400invalid_requestinput not an object or over 64 properties or 2 MiB; a spend cap not > 0 or null; a webhook_url that is not public HTTPS; empty instructions.Fix the request or the Action.
401unauthorizedMissing, malformed, or revoked key.Check the header; create a new key.
403insufficient_scopeKey lacks actions:write, or is a service-account key.Create a new dashboard key.
404action_not_foundUnknown or archived Action, or another workspace's.Check action_id.
409action_api_trigger_disabledapi_trigger_enabled is false.Enable the API call trigger.
409action_inactiveThe Action is inactive.Set the Action Active.
409action_run_in_progressA run is active and on_active_run was reject.Retry later, or use skip.
409idempotency_conflictKey reused with a different payload.Use a new key.
503studio_agent_upstream_unavailableThe Agents control plane is unconfigured, unreachable, or returned a non-JSON response.Retry; contact support if it persists.

Which trigger responses are easy to misread?

Branch on the receipt's status, not the HTTP status.

  • 202 means accepted and started. 200 means an idempotency replay (idempotency_hit: true) or, under the default on_active_run: "skip", a run skipped with skip_reason: "previous_run_active". See preventing overlapping agent runs.
  • Unknown top-level body fields are silently dropped, not rejected.
  • Sending both output_schema and response_format is 400 invalid_request. Replaying a key with a different output_schema is 409 idempotency_conflict.
  • The 503 is missing from the route's declared OpenAPI responses, so generated clients may not model it. It says retryable: false, yet the docs call a bounded retry reasonable.

Which errors can Agent Completions return?

Send exactly one of instruction or messages, always send generation_spend_cap_usd (it has no default), and drop assistant turns, since every completion runs in a fresh thread. Sume fetches attachments when you create the run, so an image_url must be public HTTPS and reachable without auth.

From Agent Completions, read 2026-09-26.
StatusCodeCause
400invalid_requestMissing spend cap, neither or both of instruction/messages, an assistant turn, malformed input, or a model other than sume-agent.
400invalid_attachmentWrong type, missing or non-HTTPS URL, both image_url and asset_id, or not an allowed image.
400attachment_not_foundasset_id is unknown in this workspace.
413attachment_too_largeAn image over 30 MB, or a set over 500 MB.
502attachment_fetch_failedUnreachable host, hotlink protection, or a non-2xx response.
403insufficient_scopeKey lacks agent_completions:*, or is a service-account key.
404agent_run_not_foundUnknown run id or another account's run. Action and Format run ids do not resolve here.
409idempotency_conflictKey reused with a different payload.

Why does a valid key get 403 insufficient_scope?

Scopes are fixed when a key is created. A key minted before Agent Completions or the Actions API-call trigger shipped lacks that surface's scopes and fails with 403 insufficient_scope. Scopes cannot be added later: create a new key at API keys and rotate. On the schedule trigger the error's next_action is authenticate: the fix is a key with the right scope, not a different body.

  • On the schedule trigger, details.required_scope names the missing scope, such as actions:write. Reads need actions:read or agent_completions:read; creating and canceling need the matching :write scope.
  • Service-account keys cannot create these runs: details.reason is service_account_action_runs_unsupported or service_account_agent_completions_unsupported.
  • 401 with Send only one API key credential. means the request carried both Authorization: Bearer and x-api-key.

Which errors come back when I read or list runs?

Read each run from its own family: /v1/action-runs/{run_id}, /v1/agent-runs/{run_id}, or /v1/format-runs/{run_id}.

  • GET /v1/action-runs/{run_id}/result is 409 run_not_completed while the run is queued or processing, with the status in details.status. The API reference lists the same 409 for /v1/agent-runs/{run_id}/result. Poll status_url while next_action is poll_status.
  • Listing a schedule's runs takes limit 1–100 (default 50). A cursor Sume did not mint is 400 invalid_request.
  • Canceling a schedule run is idempotent: a terminal run returns its receipt with 200.
  • Log request_id on every error, and include it when you ask for a run to be investigated.

What does a failed agent run report?

A run that starts and then fails ends failed with an error. On a schedule run, error.code is the output_error.code when set, otherwise action_run_failed; run webhooks fall back to agent_run_failed for Agent Completions. Over the API, output that misses your output_schema fails the run with output_schema_unsatisfied, and artifacts[] still lists the media. The exception is output_extraction_failed, which stays completed and fills in on the next read. For schema errors caught before a run starts, see fixing output_schema_invalid.

Sources

Related posts

Written by Sume