# NousResearch/hermes-agent · Gateway stdout proxy chain growth causing RecursionError

## Open now

- Nothing open on GitHub.

These items appear to concern a gateway's sys.stdout proxy chain growing over long uptime and triggering a RecursionError in _line_buffer_piped_stdout. One is a bug report and two are fix-oriented pull requests aimed at preventing stacked stdio proxies.

## TL;DR

- 9 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 7 PR(s) closed without merging.
- A fix was merged to main in PR #141308. Verify it addresses your case.
- **Recommended:** read PR #141308 (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-141308`. 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.22`: 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

- #139687: \[Bug\]: Gateway hits RecursionError in _line_buffer_piped_stdout after long uptime — sys.stdout proxy chain keeps growing

## Prior & competing PRs

- **#141308: fix(agent): agent builds no longer wrap the thread-routing stdio proxy**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/process_bootstrap.py`, `tests/agent/test_thread_scoped_output.py`
- **#120329: fix(agent): _install_safe_stdio must not wrap the thread-scoped routing proxy**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#141308`, `#139687`
- **#134254: fix(agent): stop stdio wrapper chain growth across agent builds**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#141308`, `#139687`
- **#137883: fix(agent): stdout proxy __getattr__ delegation cycle killed agent builds with RecursionError at bootstrap**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#141308`, `#139687`
- **#139693: fix(gateway): avoid stacking stdio proxies**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#141308`, `#139687`
- **#140415: fix: prevent proxy chain growth causing RecursionError (#139687)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#141308`, `#139687`
- **#140863: fix: prevent proxy chain growth causing RecursionError (#139687)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#141308`, `#139687`
- **#141013: fix(agent): stop agent builds from stacking a SafeWriter over the routing stdout proxy**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#141308`, `#139687`

## Fix status

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