Skip to content

fix: salvage non-redundant parts of PR #993#1327

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-048e6599
Mar 14, 2026
Merged

fix: salvage non-redundant parts of PR #993#1327
teknium1 merged 2 commits into
mainfrom
hermes/hermes-048e6599

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

  • salvage the two still-relevant fixes from PR fix: resource leaks and crashes in long-running gateway #993 by @Himess onto current main
  • fix LOCAL delivery dedup in gateway/delivery.py by matching the existing 3-tuple key shape
  • shut down the old ThreadPoolExecutor in environments/agent_loop.py when resizing the global pool
  • add regression tests for both salvaged behaviors
  • harden trajectory_compressor.py against None or non-string summary content and add sync/async regression tests

Why

PR #993 bundled four fixes, but two were already merged on main in stronger form:

  • log handler accumulation in run_agent.py
  • None handling in agent/context_compressor.py

This PR preserves the still-useful parts from #993 and adds one adjacent hardening fix discovered while scanning for similar response.choices[0].message.content.strip() crashes.

Test plan

  • python -m pytest tests/gateway/test_delivery.py tests/test_agent_loop.py tests/test_trajectory_compressor.py -n0 -q
  • python -m pytest tests/ -n0 -q

Related:

Himess and others added 2 commits March 14, 2026 11:03
Salvages the two still-relevant fixes from PR #993 onto current main:
- use a 3-tuple LOCAL delivery key so explicit/local-origin targets are not duplicated
- shut down the previous agent-loop ThreadPoolExecutor when resizing the global pool

Adds regression tests for both behaviors.
Normalize summary-model content before stripping so empty or non-string
responses do not trigger retry/fallback paths. Adds sync and async
regression tests for None content.
@teknium1 teknium1 merged commit 6d8286f into main Mar 14, 2026
1 check passed
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…048e6599

Merging the non-redundant fixes salvaged from NousResearch#993 onto current main, plus adjacent trajectory compressor hardening found during review.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…048e6599

Merging the non-redundant fixes salvaged from NousResearch#993 onto current main, plus adjacent trajectory compressor hardening found during review.
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…048e6599

Merging the non-redundant fixes salvaged from NousResearch#993 onto current main, plus adjacent trajectory compressor hardening found during review.
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…048e6599

Merging the non-redundant fixes salvaged from NousResearch#993 onto current main, plus adjacent trajectory compressor hardening found during review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log handler accumulates on every AIAgent init, degrading gateway performance

2 participants