Where are you creating the custom task? Is it in the same task list where workflow is running or to a different task list? I hope the following helps.
You cannot create an item in this current list, because it will start another instance of the same workflow. Clear the Automatically start this workflow when a new item is created checkbox to fix this problem.
This message appears with an error icon next to a list action in the Workflow Designer.
You are trying to design a workflow that will create an item in the list to which the workflow is attached. If a user creates an item in that list and automatically starts the workflow, the workflow creates another item, which results in another instance of the workflow. This scenario can cause the workflow to run in a continuous loop.
Use another list in the action that is different from the list attached to the workflow.
Attach the workflow to a different list.
On the first page of the Workflow Designer, clear the Automatically start this workflow when a new item is created check box, and select the Allow this workflow to be manually started from an item check box.
(Source: Troubleshoot workflow errors)