As per [this comment](https://github.com/elastic/elasticsearch/pull/93375#discussion_r1093607808) the changes in #90977 may leak the thread context of the last-completing task into the response to the list-tasks API. We need to address this before these changes are released, which is planned for 8.7.0.
server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/tasks/ListTasksIT.java
public void testListTasksFilteredByDescription() {
        
        assertThat(
            client().admin().cluster().prepareListTasks().setDetailed(true).setDescriptions("match_nothing*").get().getTasks(),
            is(empty())
        );
        
        assertThat(client().admin().cluster().prepareListTasks().setDetailed(true).setDescriptions("*").get().getTasks(), is(not(empty())));
    }
    public void testListTasksValidation() {
        ActionRequestValidationException ex = expectThrows(
            ActionRequestValidationException.class,
            () -> client().admin().cluster().prepareListTasks().setDescriptions("*").get()
        );
        assertThat(ex.getMessage(), containsString("matching on descriptions is not available when [detailed] is false"));
    }
}