# NousResearch/hermes-agent · Fix empty tool_calls wedging DeepSeek sessions

## Open now

- Nothing open on GitHub.

These issues and fixes address assistant messages with empty tool_calls arrays causing permanent session failures with DeepSeek. The work involves stripping empty tool_calls at the wire boundary and making the sanitization logic idempotent to prevent recurrence.

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

- #83312: DeepSeek 400: assistant messages with empty tool_calls:\[\] wedge sessions permanently

## Prior & competing PRs

- **#86654: fix(agent): close the empty tool_calls 400 class at all three chokepoints (#83312, #77921)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/agent_runtime_helpers.py`, `agent/transports/chat_completions.py`, `tests/agent/transports/test_chat_completions_empty_tool_calls.py`, `tests/run_agent/test_message_sequence_repair.py`
- **#83600: fix: strip empty tool_calls at wire boundary for DeepSeek compatibility**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#86654`, `#64345`, `#77944`, `#72591`
- **#83622: fix(agent): make sanitize_api_messages a fixpoint so dedup cannot re-wedge sessions (#83312)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#83312`

## Fix status

- Merged to main in PR #86654 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-08-15`.
- Subsystem: `agent`
