# NousResearch/hermes-agent · Synthetic turns overwriting channel/prompt pins bug

## Open now

- 0 issues, 1 PR open on GitHub.
- PR #126167: fix(gateway): preserve prompt pins and pending turn ownership

Multiple fixes and a bug report address a gateway issue where synthetic goal-continuation, heartbeat, and resume turns incorrectly overwrite channel or prompt pins with None. The fixes aim to preserve existing pin state across these synthetic events.

## TL;DR

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

- #126109: \[Bug\]: Goal-continuation / heartbeat / resume synthetic events overwrite the channel pin with None → system prompt flip, agent rebuild

## Prior & competing PRs

- **#139865: fix(gateway): synthetic goal/heartbeat turns and post-eviction wakes keep the system prompt byte-stable (#126109, #131031, salvage #131032 #126155)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `gateway/platforms/event.py`, `gateway/run_agent_cache.py`, `gateway/run_busy.py`, `gateway/run_goals.py`, `gateway/run_turn.py`, `gateway/run_turn_prepare.py`, `gateway/session_envelope.py`, `gateway/slash_commands_goals.py`, `tests/gateway/test_internal_event_pin_wiring.py`, `tests/gateway/test_queue_consumption.py`
- **#126151: fix(gateway): preserve channel pins for synthetic turns**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`
- **#126155: fix(gateway): stop synthetic goal/heartbeat turns from stomping channel_pin**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `abe539acdd303cdff13bddc4bd8a739dfa03bf58`, `#126155`, `#126109`, `#126167`, `#126092`
- **#126167: fix(gateway): preserve prompt pins and pending turn ownership**. open
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `5dd5193b32c4fc0dbc3aa595df6c51b6f4341840`, `8cd3d8149ead2b86aad825a539b1efabf7781963`, `#372451`, `#127944`
  - files: `gateway/platforms/base.py`, `gateway/platforms/base_text_debounce.py`, `gateway/platforms/event.py`, `gateway/run_agent_cache.py`, `gateway/run_busy.py`, `gateway/run_goals.py`, `gateway/run_inbound.py`, `gateway/run_pending.py`, `gateway/run_startup.py`, `gateway/run_turn.py`, `gateway/run_turn_prepare.py`, `gateway/session_envelope.py`, `gateway/session_prompt_pin.py`, `gateway/session_transcript.py`, `gateway/shutdown_flush.py`, `gateway/slash_commands_goals.py`, `tests/gateway/test_discord_triggering_note_persistence.py`, `tests/gateway/test_discord_turn_prompt_parity.py`, `tests/gateway/test_drained_event_conservation.py`, `tests/gateway/test_internal_event_pin_wiring.py` (+8 more)
- **#127208: fix(gateway): preserve prompt pins across synthetic goal/heartbeat/resume turns**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `69c12764dfc6`, `#126167`
- **#132681: fix(gateway): never downgrade channel pin to None on synthetic turns (fixes #126109)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#126167`

## Fix status

- Merged to main in PR #139865 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-10-16`.
- Subsystem: `gateway`
