diff --git a/src/goose/cli/session.py b/src/goose/cli/session.py index ea0ad5839..b8a098436 100644 --- a/src/goose/cli/session.py +++ b/src/goose/cli/session.py @@ -82,6 +82,7 @@ def __init__( self.prompt_session = GoosePromptSession() self.status_indicator = Status("", spinner="dots") self.notifier = SessionNotifier(self.status_indicator) + self.tracing = tracing if not tracing: logging.getLogger("langfuse").setLevel(logging.ERROR) else: @@ -93,7 +94,8 @@ def __init__( "You passed --tracing, but a Langfuse object was not found in the current context. " "Please initialize the local Langfuse server and restart Goose." ) - langfuse_context.configure(enabled=tracing) + if self.tracing: + langfuse_context.configure(enabled=tracing) profile = load_profile(profile)