# NousResearch/hermes-agent · Fix false binary detection for multibyte UTF-8 files

## Open now

- Nothing open on GitHub.

These issues and PRs address a bug where read_file incorrectly flags valid UTF-8 text files as binary when the 1000-byte sampling window cuts across a multibyte character boundary. The fix corrects binary detection logic to handle incomplete multibyte sequences at sample edges.

## TL;DR

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

- #76886: read_file reports valid UTF-8 text as binary when the 1000-byte sample cuts a multibyte character (regression in 0.19.1)

## Prior & competing PRs

- **#81961: fix(file-ops): stop flagging boundary-cut UTF-8 as binary across read_file/patch/search_files**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `contributors/emails/[redacted:email]`, `tests/tools/test_file_operations.py`, `tests/tools/test_read_file_utf8_binary_regression.py`, `tools/file_operations.py`
- **#76924: fix(file): utf-8 detection across multibyte cut (#76886)**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `a9be2f15b21d`, `#76886`, `#76924`, `#76925`, `#76934`, `#76934`, `#76924`, `#76925`, `#76924`, `#76934`, `#76924`, `#76934`, `#76924`, `#76934`, `#76925`, `#76934`, `#76925`, `#76934`, `#76925`, `#76934`, `#76934`, `#76924`, `#76925`, `#76934`, `#76886`, `#76924`, `#76925`, `#76934`, `#76934`, `#76934`, `#76924`, `#76925`, `#76934`, `#1`, `#1`, `#15803`, `#14532`, `#6`, `#1`, `#9`, `#374151`, `#4338`, `#76886`, `#76924`, `#76925`, `#76934`
- **#76925: fix(tools): don't flag boundary-cut UTF-8 as binary in read_file (#76886)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#81961`, `#76924`, `#80440`
- **#76934: fix(tools): keep invalid UTF-8 boundaries binary**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#81961`, `#76924`, `#80440`
- **#77877: fix(tools): false binary detection for UTF-8/GBK Chinese text files**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#76886`
- **#81711: fix(read_file): ignore trailing U+FFFD sampling artifact in binary detection**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#76925`

## Fix status

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