Fix false binary detection for multibyte UTF-8 files

NousResearch/hermes-agent · cluster 76886

Data as of

Nothing open on GitHub. Fix merged in #81961. Check it covers your case.

The short answer

0open issues
0open PRs
7items grouped
Known?
Yes. 7 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #81961. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this unresolved. That is separate from the fix event.
Still open
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.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #81961 fix(file-ops): stop flagging boundary-cut UTF-8 as binary across read_file/patch/search_files

    merged to main

    files: contributors/emails/[redacted:email], tests/tools/test_file_operations.py, tests/tools/test_read_file_utf8_binary_regression.py, tools/file_operations.py

5 PRs closed without merging

From the close comments: duplicate 2 · superseded by another PR 2 · partial fix 1

  • #76924 fix(file): utf-8 detection across multibyte cut (#76886) · partial fix → a9be2f1, #76886, #76924, #76925, #76934, #1, #15803, #14532, #6, #9, #374151, #4338
  • #76925 fix(tools): don't flag boundary-cut UTF-8 as binary in read_file (#76886) · superseded by another PR → #81961, #76924, #80440
  • #76934 fix(tools): keep invalid UTF-8 boundaries binary · superseded by another PR → #81961, #76924, #80440
  • #77877 fix(tools): false binary detection for UTF-8/GBK Chinese text files · duplicate → #76886
  • #81711 fix(read_file): ignore trailing U+FFFD sampling artifact in binary detection · duplicate → #76925
Closed issues · 1
  • Closed#76886read_file reports valid UTF-8 text as binary when the 1000-byte sample cuts a multibyte character (regression in 0.19.1)
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.29: the share of item 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.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Merged PRs
#81961
Closed issues
1
Attempts
5 PRs closed without merging
Fix link checked
8 Aug 2026

For your agent

The same facts, typed.