Can I filter out certain requests in a saved flow?

I’m recording a flow and I’d like to replay it as a client, but I only want to replay a subset of the requests. I just experimented with a script and used flow.kill() which kind of works but that produces an error:

Connection killedException in thread RequestReplayThread:
Traceback (most recent call last):
  File "threading.py", line 914, in _bootstrap_inner
  File "mitmproxy\proxy\protocol\http_replay.py", line 116, in run

AttributeError: 'NoneType' object has no attribute 'connected'

Additionally it doesn’t work if I try to run my recorded flow through my script and save a copy: all of the original requests are still there. I looked through the API doc and found nothing.