# NousResearch/hermes-agent · Fix for first-match logic in stored prompt matching

## Open now

- Nothing open on GitHub.

A bug was reported where \`_stored_prompt_matches_runtime\` returns the last matching line instead of the first, along with a corresponding fix. A third member titled 'Bug:test' lacks enough context to characterize.

## TL;DR

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

- #49461: "Bug:test"
- #49462: "Bug:_stored_prompt_matches_runtime_line_value_returns_last_match_instead_of_first"

## Prior & competing PRs

- **#49481: fix(agent): return first matching line in _stored_prompt_matches_runtime**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#49462`, `#71676`

## Fix status

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