Currently we use execution-date when generating the command to send via executor in https://github.com/apache/airflow/blob/9c94b72d440b18a9e42123d20d48b951712038f9/airflow/models/taskinstance.py#L420-L436

We should replace the execution_date in their to run_id instead and handle the corresponding changes needs on the executor and worker.
airflow/models/taskinstance.py
"""Write error into error file by path"""
    with open(error_file, "wb") as fd:
        try:
            pickle.dump(error, fd)
        except Exception:
            
            
            pickle.dump(str(error), fd)
def clear_task_instances(
    tis,
    session,
    activate_dag_runs=None,
    dag=None,
    dag_run_state: Union[DagRunState, Literal[False]] = DagRunState.QUEUED,
):
    """
    Clears a set of task instances, but makes sure the running ones
    get killed.
    :param tis: a list of task instances
    :param session: current session