# NousResearch/hermes-agent · Session lease acquisition and expiry bugs/fixes

## Open now

- 1 issue, 1 PR open on GitHub.
- #57052: \[Bug\]: Idle desktop/TUI tabs permanently pin max_concurrent_sessions slots (claimed at composer paint, never released while connected)
- PR #67049: fix(desktop): isolate new-session windows

Multiple bug reports and corresponding fixes addressing how active-session leases are claimed, held, and relinquished in desktop and TUI contexts, particularly around idle tabs, session switching, and detach timing.

## TL;DR

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

- #57052: \[Bug\]: Idle desktop/TUI tabs permanently pin max_concurrent_sessions slots (claimed at composer paint, never released while connected)

## Closed / duplicate issues

- #62823: Bug: "Session Zombie" queue lock and UI state leaks during session switching in Desktop App
- #68920: \[Bug\]: Desktop/TUI sessions leak active-session leases — max_concurrent_sessions blocks new sessions over time

## Prior & competing PRs

- **#122923: fix(desktop): track one unscoped stream pin per session**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/index.ts`, `apps/desktop/src/lib/gateway-events.test.ts`, `apps/desktop/src/lib/gateway-events.ts`
- **#123010: fix(tui-gateway): reap stale deferred active-session leases**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `tests/tui_gateway/test_deferred_lease_reaper.py`, `tui_gateway/session_lifecycle.py`, `tui_gateway/session_reaper.py`
- **#57059: fix(tui-gateway): claim active-session leases lazily and release them when idle (#57052)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`
- **#67049: fix(desktop): isolate new-session windows**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#66270`
  - files: `apps/desktop/src/app/contrib/hooks/use-desktop-integrations.test.tsx`, `apps/desktop/src/app/contrib/hooks/use-desktop-integrations.ts`
- **#68947: fix(tui): release active-session lease immediately on session detach, not after orphan-reap delay (#68920)**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `e35c2f6049633d3b6d897d63e637fc63b1b8b8c6`, `0f9ef9b115bf`, `#68920`, `#68947`, `#68949`, `#1`, `#15803`, `#14532`, `#6`, `#9`, `#374151`, `#4338`
- **#68949: fix(tui): reclaim leaked active-session leases with an owner-tagged pid-scoped sweep**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#68947`, `#68920`

## Fix status

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