# NousResearch/hermes-agent · Insights crash fix for non-numeric DB values

## Open now

- 1 issue, 1 PR open on GitHub.
- #71026: \[Bug\]: /insights crashes with TypeError: unsupported operand type(s) for -: 'str' and 'int'
- PR #71013: fix(insights): guard against non-numeric DB values in token/call reconciliation

A bug where the /insights endpoint crashes with a TypeError when encountering non-numeric database values during reconciliation and model breakdown computation. Multiple fixes and a helper function address safe integer conversion in these code paths.

## TL;DR

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

## Open related issues

- #71026: \[Bug\]: /insights crashes with TypeError: unsupported operand type(s) for -: 'str' and 'int'

## Prior & competing PRs

- **#71013: fix(insights): guard against non-numeric DB values in token/call reconciliation**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `2b58287c85eb`, `#71026`, `#71013`, `#71082`, `#71392`, `#71242`, `#374151`
  - files: `agent/insights.py`, `tests/agent/test_insights.py`
- **#71082: fix(insights): guard against non-numeric DB values in _compute_model_breakdown (#71026)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#71013`
- **#71392: fix(insights): use _safe_int() for non-numeric DB values in reconciliation**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#71013`

## Fix status

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