# NousResearch/hermes-agent · Background processes killed during agent lifecycle cleanup

## Open now

- 1 issue, 1 PR open on GitHub.
- #41235: Background processes killed by agent lifecycle cleanup (release())
- PR #123061: fix(gateway): classify /new and eviction turn reaps as lifecycle so persist_on_release jobs survive

These issues and PRs concern background/terminal processes being killed by SIGTERM when the agent lifecycle's release() or cleanup phase runs. At least one fix addresses preserving opted-in jobs when turns are abandoned.

## TL;DR

- 7 member(s): 1 open issue(s), 1 closed issue(s), 1 open PR(s), 1 merged PR(s), 3 PR(s) closed without merging.
- A fix was merged to main in PR #122841. Verify it addresses your case.
- **Recommended:** read PR #122841 (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: `partially_resolved` · deciding PR(s): `pr-122841`. 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.26`: 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

- #41235: Background processes killed by agent lifecycle cleanup (release())

## Closed / duplicate issues

- #41225: Background processes killed by SIGTERM during agent lifecycle release()

## Prior & competing PRs

- **#122841: fix(processes): persist_on_release keeps background jobs alive across lifecycle kill sweeps**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/client_lifecycle.py`, `gateway/run_shutdown.py`, `hermes_cli/cli_commands_mixin.py`, `tests/gateway/test_api_server_active_work_drain.py`, `tests/gateway/test_gateway_shutdown.py`, `tests/gateway/test_shutdown_kill_off_loop.py`, `tests/tools/test_code_execution.py`, `tests/tools/test_code_execution_file_rpc.py`, `tests/tools/test_persist_on_release.py`, `tools/code_execution_rpc.py`, `tools/process_registry.py`, `tools/terminal_tool.py`, `tools/terminal_tool_background.py`, `tui_gateway/methods_slash.py`, `tui_gateway/methods_tools.py`
- **#83121: fix(terminal): preserve opted-in jobs on abandoned turns**. closed without merge
  - maintainer direction: category `volume_quota`; implication `active`
- **#109846: tools: persist_on_release flag survives agent lifecycle cleanup (fixes #41225)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#82995`, `#41217`
- **#122957: feat(tools): persist_on_release flag so background processes survive lifecycle cleanup**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `ec5c9c738a`, `#109846`
- **#123061: fix(gateway): classify /new and eviction turn reaps as lifecycle so persist_on_release jobs survive**. open
  - maintainer direction: category `silent_close`; implication `active`
  - files: `gateway/run_agent_cache.py`, `tests/gateway/test_persist_on_release_turn_interrupt.py`, `tools/process_registry.py`

## Fix status

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