# NousResearch/hermes-agent · ACP session lifecycle and cleanup fixes

## Open now

- Nothing open on GitHub.

These items address a bug where ACP sessions were not being marked as ended upon client disconnect or shutdown, causing them to accumulate and become unreachable by archive or prune operations. Related fixes also touch approval batch re-gating, branch picker behavior, and plugin loader regex handling.

## TL;DR

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

- #118216: ACP sessions are never ended, so \`sessions archive\`/\`prune\` can never reach them and the desktop sidebar piles up

## Prior & competing PRs

- **#122077: fix: ACP sessions end at shutdown, approval batch re-gates after failure, base-branch picker settles, regex literals in the plugin loader**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `acp_adapter/entry.py`, `acp_adapter/session.py`, `agent/terminal_approval_batch.py`, `agent/tool_executor.py`, `apps/desktop/src/app/chat/sidebar/projects/base-branch-picker.test.tsx`, `apps/desktop/src/app/chat/sidebar/projects/base-branch-picker.tsx`, `apps/desktop/src/app/session/hooks/use-session-list-actions.ts`, `apps/desktop/src/contrib/runtime-loader.test.ts`, `apps/desktop/src/contrib/runtime-loader.ts`, `apps/desktop/src/lib/session-source.ts`, `tests/acp_adapter/test_session.py`, `tests/agent/test_terminal_approval_batch.py`
- **#118244: fix(acp): stamp open sessions ended when the stdio client disconnects**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#122077`

## Fix status

- Merged to main in PR #122077 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-27`.
