# NousResearch/hermes-agent · read_file dedup cache bugs and response inconsistencies

## Open now

- 3 issues, 4 PRs open on GitHub.
- #44819: \[Bug\]: read_file In some inappropriate situations, is the dedup likely to affect instruction compliance? For example, when reading skill commands
- #44843: read_file\` returns inconsistent response structure in \`execute_code()\` sandbox
- #53812: read_file dedup uses mtime only — stale cache on sub-second edits
- PR #44847: fix(tools): bypass read dedup in execute_code
- PR #45269: fix(tools): preserve instruction file rereads
- PR #53816: fix(tools): verify content hash alongside mtime in read_file dedup (#53812)
- PR #102813: fix(tools): bypass read dedup in execute_code

These issues and fixes center on problems with the read_file tool's deduplication mechanism, including incorrect response structures in the execute_code sandbox, cache invalidation using only mtime, loop detection bypasses, and dedup metadata leaking into file content.

## TL;DR

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

- #44819: \[Bug\]: read_file In some inappropriate situations, is the dedup likely to affect instruction compliance? For example, when reading skill commands
- #44843: read_file\` returns inconsistent response structure in \`execute_code()\` sandbox
- #53812: read_file dedup uses mtime only — stale cache on sub-second edits

## Closed / duplicate issues

- #13079: Bug: read_file tool's dedup mechanism pollutes file content with cache hint text
- #15759: \[Bug\]: read_file dedup stub never triggers loop detection — infinite read loop

## Prior & competing PRs

- **#16382: fix(file-tools): escalate to BLOCKED on repeated read_file dedup stubs**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `tests/tools/test_file_read_guards.py`, `tools/file_tools.py`
- **#44849: fix(tools): skip read_file dedup for execute_code sandbox calls**. closed without merge · fix tier `suggested`
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#44847`
- **#44997: fix(tools): make read_file dedup response consistent (#44843)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#13210: fix(file_tools): use error field instead of content in dedup stub**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#16223`
- **#14092: fix(file-tools): move dedup hints out of content**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#13079`
- **#15762: fix(tools): dedup early-return bypasses loop detection in read_file (#15759)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `a32b325d0`, `977d5f56c`, `ced8f44cd`, `#16382`, `#15759`, `#16382`
- **#44847: fix(tools): bypass read dedup in execute_code**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `model_tools.py`, `tests/tools/test_code_execution.py`, `tests/tools/test_file_read_guards.py`, `tools/code_execution_tool.py`, `tools/file_tools.py`
- **#44960: fix(tools): align read_file sandbox response format with normal tool (#44843)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`
- **#45087: fix(tools): read_file returns inconsistent response structure in execute_code sandbox (#44843)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#44843`, `#44997`, `#44847`, `#44849`, `#44960`
- **#45269: fix(tools): preserve instruction file rereads**. open
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
  - files: `tests/tools/test_file_read_guards.py`, `tools/file_tools.py`
- **#53816: fix(tools): verify content hash alongside mtime in read_file dedup (#53812)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `tests/tools/test_file_tools_dedup_hash.py`, `tools/file_tools.py`
- **#54281: fix(files): hash read dedup cache entries**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#53816`, `#53812`, `#53816`, `#53816`
- **#82873: fix(tools): bypass read_file dedup in execute_code sandbox**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#44847`, `#44847`
- **#102813: fix(tools): bypass read dedup in execute_code**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `model_tools.py`, `tests/tools/test_code_execution.py`, `tests/tools/test_file_read_guards.py`, `tools/code_execution_tool.py`, `tools/code_kernel.py`, `tools/file_tools.py`

## Fix status

- Merged to main in PR #16382 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-04-27`.
- Subsystem: `agent`
