# NousResearch/hermes-agent · read_file phantom empty trailing line for newline-terminated files

## Open now

- Nothing open on GitHub.

One bug report and several pull requests concern read_file showing an extra empty last line when a file ends in a newline. The pull request titles describe changes to stop rendering that line, and one also mentions counting unterminated final lines.

## TL;DR

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

- #49451: \[Bug\]: read_file shows a phantom empty last line for every file that ends in a newline

## Prior & competing PRs

- **#107798: fix(tools): read_file counts unterminated final lines and stops rendering a phantom trailing line (salvage #106888, #49453)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `tests/tools/test_file_operations.py`, `tests/tools/test_file_operations_edge_cases.py`, `tests/tools/test_file_ops_single_roundtrip.py`, `tools/file_operations.py`
- **#49453: fix(tools): stop read_file rendering a phantom empty line for newline-terminated files**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `6f62aff7f2bf`, `#107798`
- **#49522: fix(tools): remove phantom empty last line from read_file (#49451)**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#49453`, `#49451`

## Fix status

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