#121165 skipped the profile-global pointer for any caller with a task_id,
but only a GUI session with a workspace callback and a project path actually
moves. CLI/messaging agents and pathless projects got a successful no-op.
project_list returned the profile-global active_id, so a tab that never
switched saw whichever project another tab switched to last. It now resolves
the calling session's own workspace (the cwd the GUI gateway registers per
session_key) to its project, reporting none for a detached chat; callers the
gateway never registered keep the profile-global pointer. The idempotent
create path (#75820) no longer moves the global pointer from a live session
either.
Co-authored-by: Börje <3670651+diffen77@users.noreply.github.com>
A live session's project_create/project_switch re-anchors only that session's
workspace; it no longer rewrites the profile-global active_id that the Desktop
sidebar and other chats share.
Partial cherry-pick of the project-tools half of #69508; the Desktop renderer
changes in that commit are excluded (main already routes new sessions through
startWorkspaceSession).
(cherry picked from commit 2e94a3889159641bf8c3c7b30e224d13f0363aa5)
For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
Conflicts in 10 tools/ files resolved as the union of both sides'
simplifications (integration3's earlier r3-33-* landings vs the parent
r3-33 reconciliation):
tools/memory_tool.py, memory_tool_store.py, microsoft_graph_auth.py,
microsoft_graph_client.py, plugin_guard.py, project_tools.py,
registry.py, schema_sanitizer.py, self_repo_guard.py,
session_search_tool.py
Tool-schema dump (/tmp/rf/tools_schema_dump.py) byte-identical to
113f04616b.
Creating a project whose resolved primary path already belongs to a
non-archived project now raises a clear ValueError naming the existing
project (create_project) — duplicated projects each seeded an identical
copy of the repo subtree, multiplying the duplicate-lane bug per copy.
The agent-facing project_create tool is idempotent instead: it re-activates
the existing project rather than erroring. allow_duplicate_path=True keeps
deliberate duplicates possible. Also updates the legacy non-git lane-id
expectation to the branch-style id introduced for #53329.