# NousResearch/hermes-agent · Preserve think blocks in multi-turn history replay

## Open now

- 1 issue, 3 PRs open on GitHub.
- #20577: \[Bug\]: <think> blocks stripped from assistant history on replay to vLLM/custom provider — degrades multi-turn reasoning
- PR #20607: fix: preserve <think> blocks in content for vLLM/custom provider replay
- PR #56019: fix(agent): preserve Qwen3.6 / vLLM preserve_thinking history (#56004)
- PR #56020: fix(agent): replay preserved thinking for custom providers

These issues and PRs address a problem where <think> blocks are stripped from assistant message history when replaying to vLLM and custom providers, losing reasoning context across turns. Work focuses on detecting, preserving, and re-embedding thinking content during history replay for these providers.

## TL;DR

- 7 member(s): 1 open issue(s), 1 closed issue(s), 3 open PR(s), 0 merged PR(s), 2 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_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.26`: 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

- #20577: \[Bug\]: <think> blocks stripped from assistant history on replay to vLLM/custom provider — degrades multi-turn reasoning

## Closed / duplicate issues

- #56004: Thinking models lose their own reasoning between tool calls and turns on OpenAI-compatible endpoints (reasoning stripped on replay)

## Prior & competing PRs

- **#20607: fix: preserve <think> blocks in content for vLLM/custom provider replay**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#20609`, `#20577`, `#20609`
  - files: `run_agent.py`
- **#20609: fix(agent): re-embed <think> blocks inline for vLLM/custom providers on history replay (#20577)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
- **#56019: fix(agent): preserve Qwen3.6 / vLLM preserve_thinking history (#56004)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#58380`
  - files: `agent/agent_runtime_helpers.py`, `agent/conversation_loop.py`, `run_agent.py`, `tests/run_agent/test_qwen_preserve_thinking_56004.py`
- **#56020: fix(agent): replay preserved thinking for custom providers**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `agent/agent_init.py`, `agent/agent_runtime_helpers.py`, `agent/chat_completion_helpers.py`, `agent/conversation_loop.py`, `hermes_cli/config.py`, `run_agent.py`, `tests/agent/test_custom_provider_extra_body.py`, `tests/hermes_cli/test_config.py`, `tests/run_agent/test_deepseek_reasoning_content_echo.py`, `tests/run_agent/test_run_agent.py`
- **#58380: feat(custom-provider) Support opt-in preserve thinking**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`

## Fix status

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