# NousResearch/hermes-agent · Preserve write baselines across gateway turn cleanup

## Open now

- 1 issue, 2 PRs open on GitHub.
- #140738: \[Bug\]: gateway turn cleanup drops the session's write baselines; write_file refuses the agent's own file next turn
- PR #140743: fix: retain file write baselines across gateway turns
- PR #140757: fix(tools): keep a gateway session's write baselines across the per-turn cleanup

The three members all concern a gateway session's file write baselines being dropped during per-turn cleanup, which is described as causing write_file to refuse the agent's own file on the next turn. One is a bug report and two are fix pull requests proposing to retain the baselines across turns; the titles alone do not show whether any fix has been merged or works.

## TL;DR

- 3 member(s): 1 open issue(s), 0 closed issue(s), 2 open PR(s), 0 merged PR(s), 0 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## 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.67`: 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.

## Open related issues

- #140738: \[Bug\]: gateway turn cleanup drops the session's write baselines; write_file refuses the agent's own file next turn

## Prior & competing PRs

- **#140743: fix: retain file write baselines across gateway turns**. open
  - maintainer direction: category `silent_close`; implication `active`
  - files: `agent/chat_completion_helpers.py`, `tests/tools/test_known_file_write_baseline.py`
- **#140757: fix(tools): keep a gateway session's write baselines across the per-turn cleanup**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`
  - files: `agent/chat_completion_helpers.py`, `tests/tools/test_write_baselines_across_turns.py`, `tools/file_tools.py`, `tools/terminal_tool_lifecycle.py`

## Fix status

- No merged fix on record.
- Subsystem: `agent`
