argoproj/argo-workflows · error

failed to resume %s: %w

Error message

failed to resume %s: %w

What it means

After a valid selector is built, `argo resume` calls ResumeWorkflow for each named workflow; a server-side or transport failure for a given workflow is wrapped as `failed to resume <name>`. The underlying error may be a 404 (no such workflow), permission denied, or an already-running/completed workflow state issue reported by the controller.

Source

Thrown at cmd/argo/commands/resume.go:67

			if err != nil {
				return err
			}
			serviceClient := apiClient.NewWorkflowServiceClient(ctx)
			namespace := client.Namespace(ctx)

			selector, err := fields.ParseSelector(resumeArgs.nodeFieldSelector)
			if err != nil {
				return fmt.Errorf("unable to parse node field selector '%s': %w", resumeArgs.nodeFieldSelector, err)
			}

			for _, wfName := range args {
				_, err := serviceClient.ResumeWorkflow(ctx, &workflowpkg.WorkflowResumeRequest{
					Name:              wfName,
					Namespace:         namespace,
					NodeFieldSelector: selector.String(),
				})
				if err != nil {
					return fmt.Errorf("failed to resume %s: %w", wfName, err)
				}
				fmt.Printf("workflow %s resumed\n", wfName)
			}
			return nil
		},
	}
	command.Flags().StringVar(&resumeArgs.nodeFieldSelector, "node-field-selector", "", "selector of node to resume, eg: --node-field-selector inputs.parameters.myparam.value=abc")
	return command
}

View on GitHub (pinned to 35bff19146)

Solutions

  1. Check the workflow exists: `argo list -n <namespace> | grep <name>` or `argo get <name>`.
  2. Verify namespace/context with `kubectl config current-context` and pass `-n <namespace>`.
  3. Inspect the wrapped cause (%w) in the message for the actual API error and fix accordingly (RBAC, connectivity, state).

Example fix

// before
argo resume my-wf            # wrong namespace
// after
argo resume my-wf -n argo    # correct namespace
Defensive patterns

Strategy: try-catch

Validate before calling

argo get "$WF" -n "$NS" >/dev/null 2>&1 || { echo "workflow $WF not found in $NS"; exit 1; }

Try / catch

err := cmd.Run()
if err != nil && strings.HasPrefix(err.Error(), "failed to resume ") {
    var cause error
    errors.As(err, &cause)
    // inspect cause: 404 => wrong name/namespace, 403 => RBAC, state => workflow not suspendable
}

Prevention

When it happens

Trigger: Running `argo resume my-wf` where the workflow does not exist in the namespace, the API server is unreachable, RBAC denies the resume, or the server rejects the operation (e.g. nothing to resume).

Common situations: Wrong namespace or kubeconfig context; workflow already completed; typo in workflow name; resuming multiple workflows where one fails mid-loop aborts the remaining ones.

Related errors


AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03). Data as JSON: /api/errors/5cc3052f56f3342d. Report an issue: GitHub.