# NousResearch/hermes-agent · Hermes setup import and stack trace issues in Teams gateway

## Open now

- Nothing open on GitHub.

The three members appear related: one bug report describes a stack trace and exit during \`hermes setup\` for gateway setup, and two Teams-related fixes concern importing prompt/print helpers from the right module and repairing interactive setup imports. The titles suggest a shared import-related cause, but the exact link between the bug report and the fixes isn't confirmed by the titles alone.

## TL;DR

- 3 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 1 PR(s) closed without merging.
- A fix was merged to main in PR #19774. Verify it addresses your case.
- **Recommended:** read PR #19774 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-19774`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.67`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #19173: \[Bug\]: hermes setup stack trace and exit on gateway setup

## Prior & competing PRs

- **#19774: fix(teams): import prompt/print helpers from cli_output, not config**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `plugins/platforms/teams/adapter.py`, `scripts/release.py`, `tests/gateway/test_teams.py`
  - fix hunks:
  - `plugins/platforms/teams/adapter.py`

    ```diff
    @@ -592,6 +592,8 @@ def interactive_setup() -> None:
         from hermes_cli.config import (
             get_env_value,
             save_env_value,
    +    )
    +    from hermes_cli.cli_output import (
             prompt,
             prompt_yes_no,
             print_info,
    ```
  - `scripts/release.py`

    ```diff
    @@ -344,6 +344,7 @@
         "[redacted:email]": "g-guthrie",
         "[redacted:email]": "bobashopcashier",
         "77253505+bobashopcashier@users.noreply.github.com": "bobashopcashier",
    +    "25355950+megastary@users.noreply.github.com": "megastary",  # PR #18325
         "[redacted:email]": "areu01or00",
         "[redacted:email]": "bryanyoung",
         "[redacted:email]": "christomitov",
    ```
  - `tests/gateway/test_teams.py`

    ```diff
    @@ -313,9 +313,33 @@ def test_register_has_platform_hint(self):
     
     
     # ---------------------------------------------------------------------------
    -# Tests: Connect / Disconnect
    +# Tests: Interactive setup (import fix regression — #18325 / #19173)
     # ---------------------------------------------------------------------------
     
    +class TestTeamsInteractiveSetup:
    +    def test_interactive_setup_persists_credentials(self, tmp_path, monkeypatch):
    +        """Regression for #19173: interactive_setup must import prompt helpers
    +        from hermes_cli.cli_output (not hermes_cli.config) and persist
    +        credentials to .env without crashing.
    +        """
    +        hermes_home = tmp_path / "hermes"
    +        monkeypatch.setenv("HERMES_HOME", str(hermes_home))
    +
    +        import hermes_cli.cli_output as cli_output_mod
    +
    +        answers = iter(["client-id", "client-secret", "tenant-id", "aad-1, aad-2"])
    +        monkeypatch.setattr(cli_output_mod, "prompt", lambda *_a, **_kw: next(answers))
    +        monkeypatch.setattr(cli_output_mod, "prompt_yes_no", lambda *_a, **_kw: True)
    +        monkeypatch.setattr(cli_output_mod, "print_info", lambda *_a, **_kw: None)
    +        monkeypatch.setattr(cli_output_mod, "print_success", lambda *_a, **_kw: None)
    +        monkeypatch.setattr(cli_output_mod, "print_warning", lambda *_a, **_kw: None)
    +
    +        _teams_mod.interactive_setup()
    +
    +        env_text = (hermes_home / ".env").read_text(encoding="utf-8")
    +        assert "TEAMS_CLIENT_ID=client-id" in env_text
    +        assert "TEAMS_TENANT_ID=tenant-id" in env_text
    +
     class TestTeamsConnect:
         @pytest.mark.asyncio
         async def test_connect_fails_without_sdk(self, monkeypatch):
    ```
- **#19188: fix(teams): repair interactive setup imports**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#19774`, `#18325`

## Fix status

- Merged to main in PR #19774 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-05-04`.
