# NousResearch/hermes-agent · Session DB handle lost during in-place agent rebuilds

## Open now

- 0 issues, 2 PRs open on GitHub.
- PR #101740: fix(tui_gateway): carry the live session handle through in-place agent rebuilds
- PR #102137: fix(tui_gateway): open the profile session db for in-place agent rebuilds (#101719)

These items address a bug where in-place agent rebuilds in the TUI gateway fail to carry the correct profile session database handle, causing turns to be persisted into the wrong session state. The fixes ensure the live session DB is opened and threaded through rebuild operations correctly.

## TL;DR

- 3 member(s): 0 open issue(s), 1 closed issue(s), 2 open PR(s), 0 merged PR(s), 0 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: `unresolved`. 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

- #101719: Bot Chat capability-refresh rebuild persists a named profile's turns into the launch profile's state.db (_make_agent defaults session_db to _get_db())

## Prior & competing PRs

- **#101740: fix(tui_gateway): carry the live session handle through in-place agent rebuilds**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#78630`, `#78629`, `#101719`
  - files: `tests/test_tui_gateway_server.py`, `tui_gateway/server.py`
- **#102137: fix(tui_gateway): open the profile session db for in-place agent rebuilds (#101719)**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#101740`
  - files: `tui_gateway/server.py`

## Fix status

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