# NousResearch/hermes-agent · Agent image eviction threshold and cache prefix fix

## Open now

- Nothing open on GitHub.

These issues and PRs address a bug where image eviction was triggering based on a fixed keep-newest count rather than provider limits, which was invalidating the Anthropic prompt-cache prefix on nearly every turn. The work focuses on aligning eviction behavior with provider-specific limits to preserve the cached prefix across batches.

## TL;DR

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

- #113517: Image eviction fires at a keep-newest count of 3, invalidating the Anthropic prompt-cache prefix on nearly every turn

## Prior & competing PRs

- **#113953: fix(agent): image eviction fires at the provider limit and holds the cached prefix between batches (#113517, salvage #113519)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/anthropic_message_convert.py`, `agent/context_compressor.py`, `agent/image_eviction_policy.py`, `tests/agent/test_image_eviction_policy.py`, `tests/agent/test_outbound_stale_vision.py`, `tests/tools/test_computer_use.py`, `website/docs/user-guide/features/computer-use.md`
- **#113519: fix(agent): evict images at the provider limit, not on a keep-newest count**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#113619`
- **#113542: fix(agent): evict images at provider limits to preserve prompt-cache prefix**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#113517`, `#113519`, `#113519`, `#113519`, `#113519`, `#113519`, `#113519`
- **#113619: fix(agent): evict images at provider limits to preserve prompt-cache prefix**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `4fe83671f473e38e29315330632373573d271bed`, `3977a2ad1b71893d2b3345b4672bd4903ddf8208`, `bafbf880320065904cd88a7fbc4722946578fc06`, `#113517`, `#113519`, `#103217`, `#103217`, `#113517`, `#113519`, `#113542`, `#103217`, `#102959`, `#103217`

## Fix status

- Merged to main in PR #113953 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-17`.
