# NousResearch/hermes-agent · Fix non-ASCII data loss in turn recovery fallback

## Open now

- Nothing open on GitHub.

These issues and PRs address a bug where the ASCII-codec fallback during turn/unicode recovery irreversibly removes non-ASCII content from conversation history stored in session state. The fixes aim to preserve conversation history intact when handling UnicodeEncodeError conditions.

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

- #117802: \[Bug\]: Turn-recovery ASCII fallback irreversibly strips non-ASCII content from session history (state.db)

## Prior & competing PRs

- **#118313: fix(agent): keep conversation history intact during ASCII-codec recovery (salvage of #117891)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/message_sanitization.py`, `agent/turn_recovery.py`, `contributors/emails/109447498+Baophan00@users.noreply.github.com`, `tests/agent/test_unicode_ascii_codec.py`
- **#117812: fix(turn-recovery): stop stripping non-ASCII from conversation content on UnicodeEncodeError**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#117802`, `#118313`, `#117891`, `#117569`
- **#117891: fix(agent): preserve conversation history during unicode recovery**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `d2cec3b33d`, `1c5c7129b34`, `54606496a6e`, `#118313`, `#117812`, `#117802`

## Fix status

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