You may need to maintain state in filters and command handlers. There are various ways to do this:
Use the WAM capabilities
Use the Framework's Virtual Clipboard