Are search agents meant to stop 'processing' when you switch from the search tab to a different tab?

Our search agent implolementation is not stopping to process a search request, when you switch away from the ‘search’ tab, which is not a problem in the first place. However, coming back to the search tab sometimes leaves the agent in a non functional way.

  1. Are agents supposed to keep on processing the search request in the background?
    1. If so - i need to fix my code.
    2. If not - is there a unified way which Xprotect is using to signal, that the search should stop? E.g. through the CancellationToken? At the moment I am not successful with the cancelation token … but i can of course ‘manually’ detect a swich of tabs if this is the way to proceed.

Thanks in advance.

I think i found the solution already. For the sake of simplicity i stop the search now, when the search filter control is closed, but I assume it should also be possible to keep the search up and running in the background. This goes into our backlog.