# NousResearch/hermes-agent · fsync correct directory for atomic writes through symlinks

## Open now

- Nothing open on GitHub.

These issues and PRs address a bug where atomic file writes involving symlinks incorrectly fsync the symlink's directory rather than the lookup target's directory. Multiple fix attempts and related discussions are grouped here.

## 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 #116763. Verify it addresses your case.
- **Recommended:** read PR #116763 (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-116763`. 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

- #115030: atomic_write_text(fsync_dir=True) syncs the link directory instead of the resolved target directory

## Prior & competing PRs

- **#116763: fix(utils): atomic writes fsync the directory that received the file behind a symlink (#115030, salvage #115042)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `contributors/emails/[redacted:email]`, `tests/test_atomic_write_fsync_dir_target.py`, `utils.py`
- **#115042: fix(utils): fsync the resolved target's parent in atomic writes**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `f760dd234569`, `#116763`, `#115030`, `#115042`
- **#115043: fix(utils): fsync the resolved target directory in _atomic_write**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `f760dd234569`, `#116763`, `#115030`, `#115042`
- **#115058: fix(utils): fsync the resolved target's directory, not the symlink's (#115030)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `f760dd234569`, `#116763`, `#115030`, `#115042`
- **#115086: fix(utils): fsync the resolved target directory for atomic writes**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `f760dd234569`, `#116763`, `#115030`, `#115042`
- **#115286: fix(utils): fsync the resolved target's directory when writing through a symlink**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `f760dd234569`, `#116763`, `#115030`, `#115042`

## Fix status

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