# NousResearch/hermes-agent · Anthropic tests leaking into macOS Keychain and browser

## Open now

- 1 issue, 2 PRs open on GitHub.
- #27003: Pre-existing failure: test_returns_token_from_credential_files
- PR #27065: fix(anthropic): guard keychain reader against non-string stdout (#27003)
- PR #57111: fix(anthropic): harden keychain credential parsing

A cluster of bugs and fixes addressing test isolation failures where the Anthropic adapter test suite inadvertently reads from the developer's macOS Keychain or opens real browser OAuth flows during local runs. Work spans hardening keychain output parsing and mocking out system-level side effects.

## TL;DR

- 12 member(s): 1 open issue(s), 3 closed issue(s), 2 open PR(s), 1 merged PR(s), 5 PR(s) closed without merging.
- A fix was merged to main in PR #74517. Verify it addresses your case.
- **Recommended:** read PR #74517 (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: `unresolved`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.17`: 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.

## Open related issues

- #27003: Pre-existing failure: test_returns_token_from_credential_files

## Closed / duplicate issues

- #35404: Test suite opens a real browser / xAI OAuth flow + reads the dev's macOS Keychain on local runs
- #58415: \[Bug\]: Anthropic OAuth setup-token tests fail on macOS keychain subprocess path
- #58609: Anthropic adapter tests are not isolated from Claude Code macOS Keychain

## Prior & competing PRs

- **#58613: fix(tests): isolate Anthropic keychain credentials**. closed without merge · fix tier `suggested`
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#58612`, `#58609`, `#57111`, `#27065`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#74517: test: land the test-stability backlog — 12 PRs salvaged, Windows hermeticity, fail-closed guards, event-based waits**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `.github/workflows/tests.yml`, `contributors/emails/[redacted:email]`, `contributors/emails/[redacted:email]`, `contributors/emails/[redacted:email]`, `contributors/emails/[redacted:email]`, `gateway/restart.py`, `gateway/slash_commands.py`, `hermes_cli/web_server.py`, `hermes_state.py`, `plugins/memory/honcho/session.py`, `scripts/run_tests.sh`, `tests/agent/test_anthropic_keychain.py`, `tests/agent/test_copilot_acp_client.py`, `tests/agent/test_vision_routing_31179.py`, `tests/conftest.py`, `tests/cron/test_sessiondb_init_hang.py`, `tests/gateway/test_approve_deny_commands.py`, `tests/gateway/test_complete_path_at_filter.py`, `tests/gateway/test_restart_drain.py`, `tests/gateway/test_restart_service_detection.py` (+13 more)
- **#27065: fix(anthropic): guard keychain reader against non-string stdout (#27003)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `agent/anthropic_adapter.py`, `tests/agent/test_anthropic_adapter.py`
- **#35464: test: guard browser and Keychain side effects**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `45ffeea70a`, `#74517`, `#35404`
- **#41880: test(auth): prevent browser popup during OAuth loopback tests**. closed without merge
  - maintainer direction: category `stale_abandoned`; implication `active`
- **#57111: fix(anthropic): harden keychain credential parsing**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#27065`, `#27003`, `#27065`, `#31017`
  - files: `agent/anthropic_adapter.py`, `tests/agent/test_anthropic_keychain.py`
- **#58419: test(agent): isolate anthropic oauth setup token from macos keychain**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#74517`, `#35464`, `#35093`
- **#58612: fix(tests): isolate anthropic adapter tests from macOS Keychain**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#74517`, `#35464`, `#58609`, `#43344`

## Fix status

- Merged to main in PR #74517 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-07-30`.
- Subsystem: `agent`
