# NousResearch/hermes-agent · Logging fixes and resource leaks in AIAgent/gateway

## Open now

- Nothing open on GitHub.

These issues and PRs address log handler accumulation on repeated AIAgent initialization, centralized logging setup, and related resource leaks affecting long-running gateway performance.

## TL;DR

- 5 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 3 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-1327`. 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.40`: 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

- #990: Log handler accumulates on every AIAgent init, degrading gateway performance

## Prior & competing PRs

- **#993: fix: resource leaks and crashes in long-running gateway**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#1327`, `#993`
- **#1025: fix: prevent log handler accumulation in AIAgent.__init__**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
- **#1029: fix: prevent log handler accumulation in AIAgent.__init__**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
- **#1327: fix: salvage non-redundant parts of PR #993**. merged to main
  - maintainer direction: category `merged`
  - files: `environments/agent_loop.py`, `gateway/delivery.py`, `tests/gateway/test_delivery.py`, `tests/test_agent_loop.py`, `tests/test_trajectory_compressor.py`, `trajectory_compressor.py`

## Fix status

- No merged fix on record.
- Subsystem: `agent`
