switch_profile: run the switch alone, then the batch on the new tools
A tool called in the same batch as switch_profile was still dispatched against
the old tool_map and died with "tool 'X' not found" — reload_tools did, twice
in one session. The batch is now split: the switch runs first, its
ProfileSwitched event is watched for the target profile, the tools are
re-resolved from it, and the remaining calls run against the new set.

The turn's own profile binding is deliberately left alone — the
end-of-iteration reload in run_stream() is what rebinds profile/llm/schemas,
and pre-setting session.profile_id here would make it skip that step.
1 parent 46672f2 commit 30d6c3e247b76a71330158072cb7d8a3bd25477b
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 9 hours ago
Showing 2 changed files
View
navi/core/agent.py
View
tests/unit/core/test_parallel_tools.py