Caused by: io.temporal.internal.statemachines.InternalWorkflowTaskException: Failure handling event 6 of type 'EVENT_TYPE_WORKFLOW_TASK_STARTED' during execution

2025-08-14 19:08:43 ERROR io.temporal.internal.worker.PollerOptions [Workflow Executor taskQueue=“dlp”, namespace=“default”: 1] uncaught exception

java.lang.RuntimeException: Failure processing workflow task. WorkflowId=1-111-AAA-11111, RunId=39c73742-c0e6-4862-9528-a11d3bd0f98f, Attempt=2

at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.wrapFailure(WorkflowWorker.java:286) ~[temporal-sdk-1.16.0.jar:?]

at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.wrapFailure(WorkflowWorker.java:180) ~[temporal-sdk-1.16.0.jar:?]

at io.temporal.internal.worker.PollTaskExecutor.lambda$process$0(PollTaskExecutor.java:98) ~[temporal-sdk-1.16.0.jar:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]

at java.lang.Thread.run(Thread.java:840) [?:?]

Caused by: io.temporal.internal.statemachines.InternalWorkflowTaskException: Failure handling event 6 of type ‘EVENT_TYPE_WORKFLOW_TASK_STARTED’ during execution. {WorkflowTaskStartedEventId=6, CurrentStartedEventId=6}

at io.temporal.internal.statemachines.WorkflowStateMachines.createEventProcessingException(WorkflowStateMachines.java:257) ~[temporal-sdk-1.16.0.jar:?]

at io.temporal.internal.statemachines.WorkflowStateMachines.handleEventsBatch(WorkflowStateMachines.java:236) ~[temporal-sdk-1.16.0.jar:?]

at io.temporal.internal.statemachines.WorkflowStateMachines.handleEvent(WorkflowStateMachines.java:208) ~[temporal-sdk-1.16.0.jar:?]

Can you share event history json of this execution? Sounds like during replay you run into exception that should fail execution which is not reflected in event history.