diff --git a/cli.py b/cli.py index 3fa210ffa..1fc466343 100755 --- a/cli.py +++ b/cli.py @@ -5550,7 +5550,7 @@ class HermesCLI: from honcho_integration.client import HonchoClientConfig from agent.display import honcho_session_line, write_tty hcfg = HonchoClientConfig.from_global_config() - if hcfg.enabled: + if hcfg.enabled and hcfg.api_key: sname = hcfg.resolve_session_name(session_id=self.session_id) if sname: write_tty(honcho_session_line(hcfg.workspace_id, sname) + "\n") diff --git a/honcho_integration/client.py b/honcho_integration/client.py index 507fc9d4f..ccc2f6f25 100644 --- a/honcho_integration/client.py +++ b/honcho_integration/client.py @@ -114,11 +114,12 @@ class HonchoClientConfig: @classmethod def from_env(cls, workspace_id: str = "hermes") -> HonchoClientConfig: """Create config from environment variables (fallback).""" + api_key = os.environ.get("HONCHO_API_KEY") return cls( workspace_id=workspace_id, - api_key=os.environ.get("HONCHO_API_KEY"), + api_key=api_key, environment=os.environ.get("HONCHO_ENVIRONMENT", "production"), - enabled=True, + enabled=bool(api_key), ) @classmethod