# NousResearch/hermes-agent · model_tools import triggers unwanted state.db creation

## Open now

- 0 issues, 1 PR open on GitHub.
- PR #123348: fix(tools): avoid state.db creation and schema migration on model_tools import

Importing model_tools unexpectedly creates and migrates state.db due to async-delegation restore running in the ProcessRegistry constructor. Work addresses this side effect and related off-turn work profile attribution.

## TL;DR

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

## Closed / duplicate issues

- #123265: \[Bug\]: Importing \`model_tools\` creates and migrates \`state.db\` (async-delegation restore runs in the \`ProcessRegistry\` constructor)

## Prior & competing PRs

- **#126165: Off-turn work (curator, deferred reviews, catalog SWR, plugin API routes, ledger replay) runs under the requesting profile; import model_tools no longer creates state.db (#125032 #108537 #120310 #123372 #103778 #123265)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/curator.py`, `agent/review_idle_queue.py`, `gateway/run_notifications.py`, `gateway/run_startup.py`, `hermes_cli/model_catalog.py`, `hermes_cli/web_server_dashboard.py`, `tests/agent/test_curator.py`, `tests/agent/test_review_idle_queue.py`, `tests/fixtures/plugins/example-dashboard/dashboard/plugin_api.py`, `tests/gateway/test_multiplex_unserved_shared_ingress.py`, `tests/hermes_cli/test_model_catalog.py`, `tests/hermes_cli/test_web_server.py`, `tests/plugins/test_kanban_dashboard_plugin.py`, `tests/tools/test_async_delegation.py`, `tests/tools/test_process_registry_lazy_restore.py`, `tests/tui_gateway/test_notification_turn_release.py`, `tools/async_delegation.py`, `tools/process_registry.py`, `tui_gateway/session_notifications.py`
- **#123348: fix(tools): avoid state.db creation and schema migration on model_tools import**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `05192974c0`
  - files: `tests/tools/test_async_delegation.py`, `tools/async_delegation.py`, `tools/process_registry.py`

## Fix status

- Merged to main in PR #126165 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-28`.
- Subsystem: `agent`
