# NousResearch/hermes-agent · File tools ignoring TERMINAL_CWD for path resolution

## Open now

- Nothing open on GitHub.

A bug where file_tools.py resolves relative paths against the process working directory instead of TERMINAL_CWD, causing file operations to escape worktree isolation in CLI -w mode. Multiple fix attempts address anchoring path resolution to the correct base directory.

## TL;DR

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

- #12689: \[Bug\]: file_tools.py ignores TERMINAL_CWD — file operations leak out of worktree isolation in CLI -w mode

## Prior & competing PRs

- **#12808: fix(file_tools): resolve relative paths against TERMINAL_CWD for worktree isolation (#12689)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#13161: fix(file_tools): resolve relative paths against TERMINAL_CWD for worktree isolation**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `scripts/release.py`, `tests/tools/test_resolve_path.py`, `tools/file_tools.py`
- **#12695: fix(file_tools): resolve relative paths against TERMINAL_CWD for worktree isolation**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#13161`, `#13161`
- **#12721: fix(file-tools): resolve relative paths against TERMINAL_CWD**. closed without merge
  - maintainer direction: category `stale_abandoned`; implication `active`
- **#13080: fix(file-tools): respect TERMINAL_CWD for path resolution in worktree mode**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#13161`, `#12695`

## Fix status

- Merged to main in PR #13161 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-04-20`. This confirmation is old and may be out of date (a revert/reopen would not have invalidated it here); re-verify.
