# NousResearch/hermes-agent · Leading zeros lost in union tool argument coercion

## Open now

- 1 issue, 3 PRs open on GitHub.
- #55369: Union integer|string tool args drop leading zeros: "007" is coerced to 7
- PR #55370: Keep leading-zero union values as strings in tool-argument coercion
- PR #55401: fix: preserve leading zeros in union integer|string tool arg coercion (#55369)
- PR #136858: fix(tools): strings valid for a type union with "string" no longer coerced ("02134" stays "02134") (#55369, salvage #128059, port openclaw#158974)

Reports and a fix attempt address a bug where string values with leading zeros (e.g. '007') are incorrectly coerced to integers when tool arguments accept a union of integer and string types.

## TL;DR

- 4 member(s): 1 open issue(s), 0 closed issue(s), 3 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.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.

## Open related issues

- #55369: Union integer|string tool args drop leading zeros: "007" is coerced to 7

## Prior & competing PRs

- **#55370: Keep leading-zero union values as strings in tool-argument coercion**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `tests/run_agent/test_tool_arg_coercion.py`, `tools/arg_coercion.py`
- **#55401: fix: preserve leading zeros in union integer|string tool arg coercion (#55369)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#55369`
  - files: `model_tools.py`, `tests/run_agent/test_tool_arg_coercion.py`
- **#136858: fix(tools): strings valid for a type union with "string" no longer coerced ("02134" stays "02134") (#55369, salvage #128059, port openclaw#158974)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `cd5de7ab2c1d6e27b534d00e5b475ad12a619329`
  - files: `tests/tools/test_arg_coercion.py`, `tools/arg_coercion.py`

## Fix status

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