diff --git a/autogen/io/base.py b/autogen/io/base.py index db25560e0e82..ccdd1d1838fa 100644 --- a/autogen/io/base.py +++ b/autogen/io/base.py @@ -76,8 +76,10 @@ def get_default() -> "IOStream": """ iostream = IOStream._default_io_stream.get() if iostream is None: - logger.warning("No default IOStream has been set, defaulting to IOConsole.") - return IOStream.get_global_default() + logger.info("No default IOStream has been set, defaulting to IOConsole.") + iostream = IOStream.get_global_default() + # Set the default IOStream of the current context (thread/cooroutine) + IOStream.set_default(iostream) return iostream @staticmethod