Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesskunk-ape

Relationships

#4641 serve: resuming a run waiting at an approval gate answers 500 action_failed on /api/v1/action

Opened by skunk-ape · 11/11/2026· Shipped 11/11/2026

What happens

On POST /api/v1/action, a workflow.resume for a run that is waiting at an open approval gate answers 500 action_failed ("The action failed"), and serve logs nothing about it. This happens even when the person who started the run asks.

A 500 tells an integration that serve broke, so the app tells the person something failed on Swamp's side and may retry. In fact the request can't succeed until someone decides the gate.

Reproduction (swamp origin/main 3fb0c65ca, local serve in OAuth mode)

  1. Link a person through an integration, with a ceiling allowing run, read and approve on workflow:scale-web. The workflow has an approval step approve.
  2. As them, send workflow.run with {"workflowIdOrName":"scale-web","inputs":{"count":3},"idempotencyKey":"k1"}. It answers 202, and the run suspends at approve.
  3. As the same person, send workflow.resume with {"workflowIdOrName":"scale-web","runId":"<runId>"}.

You get 500 {"code":"action_failed","message":"The action failed","requestId":"..."}. A second linked person gets the same answer, without inputs. With inputs they correctly get 403 resume_inputs_refused.

Cause

src/serve/http_action_reply.ts:248 maps the gate state waiting to ACTION_FAILED, with the comment "refused while the gate still waits, so not a race a retry would settle".

Expected

A 4xx with its own code, such as 409 and a message saying the run is waiting at an approval gate and must be decided rather than resumed. Better still, name the gate. Serve should also log the refusal.

The manual's integration guide (swamp-club#4619) currently tells app authors to decide the gate rather than resume, and names the 500.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 8 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/11/2026, 4:17:05 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
skunk-ape assigned skunk-ape11/11/2026, 3:14:47 PM

Sign in to post a ripple.