# NousResearch/hermes-agent · Handling unparseable JSON strings in tool argument coercion

## Open now

- 1 issue, 2 PRs open on GitHub.
- #132942: todo_list: coerce_tool_args wraps an unparseable todos string as \[raw\]; TodoStore silently replaces the whole list with a "(invalid item)" placeholder
- PR #132950: fix(tools): keep unparseable container-shaped strings unwrapped in coerce_tool_args
- PR #161359: Tools tell the model its JSON is broken instead of a misleading shape error (#132942, salvage #132950)

These members concern how coerce_tool_args treats tool arguments that are strings shaped like JSON containers but cannot be parsed. One describes the todo_list case where the raw string is wrapped and the TodoStore list is replaced by a placeholder; the others refer to leaving such strings unwrapped and giving the model a clearer error about broken JSON.

## 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

- #132942: todo_list: coerce_tool_args wraps an unparseable todos string as \[raw\]; TodoStore silently replaces the whole list with a "(invalid item)" placeholder

## Prior & competing PRs

- **#132950: fix(tools): keep unparseable container-shaped strings unwrapped in coerce_tool_args**. open
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#161359`
  - files: `tests/agent/test_tool_arg_coercion.py`, `tools/arg_coercion.py`
- **#161359: Tools tell the model its JSON is broken instead of a misleading shape error (#132942, salvage #132950)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `ba65e44c6769e84e1d629f1b3c177cca2d8c493d`
  - files: `tests/agent/test_tool_arg_coercion.py`, `tools/arg_coercion.py`, `tools/arg_validation.py`, `tools/tool_search_validation.py`

## Fix status

- No merged fix on record.
- Subsystem: `agent`
- Kind: `bug` (from the open issues' GitHub type labels).
