# NousResearch/hermes-agent · Profile switch cwd inheritance bug fixes

## Open now

- 1 issue, 1 PR open on GitHub.
- #79406: Bug: Profile switch causes wrong AGENTS.md to be loaded (cwd inherited from previous profile project)
- PR #134085: fix: scope the desktop project cache per profile for new-session cwd (#79406)

A bug where the current working directory is incorrectly inherited from a previous profile's project during profile switches, causing wrong files (such as AGENTS.md) to be loaded. Fixes address this in both the desktop and TUI layers by resolving cwd from the correct profile's projects database.

## TL;DR

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

- #79406: Bug: Profile switch causes wrong AGENTS.md to be loaded (cwd inherited from previous profile project)

## Prior & competing PRs

- **#79453: fix(desktop): do not inherit project cwd across profile switches**. closed without merge
  - maintainer direction: category `stale_abandoned`; implication `active`
- **#124174: fix(tui): resolve cwd from the bound profile's projects.db across profile switches (#79406)**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#134085`
- **#134085: fix: scope the desktop project cache per profile for new-session cwd (#79406)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `3a30c7dfd7e0c12c8a9c18ca23046c5d07b1f366`, `#134085`
  - files: `apps/desktop/src/app/session/hooks/use-session-actions/index.ts`, `apps/desktop/src/app/session/hooks/use-session-actions/profile-swap-routing.test.tsx`, `apps/desktop/src/app/session/hooks/use-session-actions/profile-swap.ts`, `apps/desktop/src/sdk/profile-routing.test.ts`, `apps/desktop/src/store/gateway-switch.ts`, `apps/desktop/src/store/projects-profile-switch.test.ts`, `apps/desktop/src/store/projects.test.ts`, `apps/desktop/src/store/projects.ts`, `apps/desktop/src/store/reactions-local.test.ts`, `contributors/emails/ubuntu@apmere-usa`, `tests/tui_gateway/test_completion_cwd_profile_project.py`, `tui_gateway/session_workdir.py`

## Fix status

- No merged fix on record.
- Subsystem: `apps/desktop`
