agent: Streamline the supervised mode code.