# NousResearch/hermes-agent · TUI session write ordering and row placement fixes

## Open now

- 0 issues, 1 PR open on GitHub.
- PR #123573: fix(desktop): rotate unprocessed reap records ahead of survivors so deadline starvation cannot strand trailing orphans

These items address a bug where a single user turn's data could be split across multiple sessions, along with related fixes for row queuing, compaction survival, and reap record rotation ordering in the TUI gateway.

## TL;DR

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

- #123545: \[Bug\]: Windows - one user message written into two sessions, tool rows split across them (repro for #119171)

## Prior & competing PRs

- **#128282: fix(tui_gateway): one turn's rows land in one session, and the queued row survives an in-place compaction**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/message_metadata.py`, `hermes_state_messages.py`, `tests/tui_gateway/test_queued_prompt_persistence.py`, `tests/tui_gateway/test_submit_row_session_target.py`, `tests/tui_gateway/test_tui_gateway_server.py`, `tui_gateway/methods_prompt.py`, `tui_gateway/methods_session.py`, `tui_gateway/prompt_turn.py`, `tui_gateway/server.py`, `tui_gateway/session_auto_continue.py`, `tui_gateway/session_workdir.py`
- **#123573: fix(desktop): rotate unprocessed reap records ahead of survivors so deadline starvation cannot strand trailing orphans**. open
  - maintainer direction: category `silent_close`; implication `active`
  - files: `apps/desktop/electron/backend-ownership.test.ts`, `apps/desktop/electron/backend-ownership.ts`
- **#123635: fix(tui_gateway): file off-turn session writes in the session the turn will use (#123545)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#128282`

## Fix status

- Merged to main in PR #128282 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-30`.
- Subsystem: `apps/desktop`
