# NousResearch/hermes-agent · Fix subagent foreign key and sidebar leak bug

## Open now

- 1 issue, 2 PRs open on GitHub.
- #103789: \[Bug\]: Subagents leak into Sessions list when parent session row is uncommitted (FOREIGN KEY failure)
- PR #103794: fix(delegate): ensure the parent session row exists before spawning children
- PR #105284: fix(agent): keep subagents out of the sidebar when the parent row is late

These items address a bug where subagent/child sessions fail or appear incorrectly in the sidebar when the parent session row has not yet been committed to the database, causing foreign key constraint violations. The fixes ensure the parent row exists before spawning children.

## TL;DR

- 3 member(s): 1 open issue(s), 0 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.

## Open related issues

- #103789: \[Bug\]: Subagents leak into Sessions list when parent session row is uncommitted (FOREIGN KEY failure)

## Prior & competing PRs

- **#103794: fix(delegate): ensure the parent session row exists before spawning children**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `e1bceb5b7f`
  - files: `tests/tools/test_delegate.py`, `tools/delegate_tool.py`
- **#105284: fix(agent): keep subagents out of the sidebar when the parent row is late**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#103789`, `#103794`, `#103794`
  - files: `agent/session_persistence.py`, `tests/tools/test_delegate_session_persistence.py`, `tools/delegate_tool.py`

## Fix status

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