# NousResearch/hermes-agent · Fix stdin/heredoc corrupting file write commands

## Open now

- Nothing open on GitHub.

A bug where SDK stdin was incorrectly embedded in command arguments caused write_file and patch operations to empty target files on certain platforms (Modal, Daytona, Vercel). Fixes involve streaming stdin separately rather than including it in command argv.

## TL;DR

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

- #122011: \[Bug\]: write_file and patch empty the target file on Modal/Daytona/Vercel (heredoc stdin lands on the last command)

## Prior & competing PRs

- **#122012: fix(environments): write_file/patch no longer empty the target on Modal/Daytona/Vercel — heredoc stdin byte-exact**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `contributors/emails/[redacted:email]`, `tests/tools/test_base_environment.py`, `tests/tools/test_file_ops_single_roundtrip.py`, `tests/tools/test_tool_result_storage.py`, `tools/environments/base.py`, `tools/tool_result_storage.py`
- **#124206: fix(environments): stream SDK stdin instead of embedding it in command argv**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `tests/tools/test_modal_bulk_upload.py`, `tests/tools/test_vercel_sandbox_environment.py`, `tools/environments/base.py`, `tools/environments/daytona.py`, `tools/environments/modal.py`, `tools/environments/vercel_sandbox.py`, `tools/terminal_tool_sudo.py`
- **#122214: fix(environments): keep SDK stdin out of command argv**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#122218`, `#122218`
- **#122218: fix(environments): keep SDK stdin out of command argv**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `95fc717460`, `#124206`

## Fix status

- Merged to main in PR #122012 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-26`.
