Several cwd-scoped queries opt into keepPreviousData, while their consumers immediately use the new cwd: the file tree mounts retained paths against the new cwd; the workspace services menu shows old script rows whose run/stop callbacks capture the new cwd; and Git status/PR/diff hooks can render the previous repository's state or patch inside the new workspace panel. Switch from workspace A to B and these old rows/statuses can be acted on as if they belong to B while B's queries load. Gate workspace-scoped data by its requested key or clear it during cwd changes, and keep actions tied to the data's source cwd.
Several cwd-scoped queries opt into keepPreviousData, while their consumers immediately use the new cwd: the file tree mounts retained paths against the new cwd; the workspace services menu shows old script rows whose run/stop callbacks capture the new cwd; and Git status/PR/diff hooks can render the previous repository's state or patch inside the new workspace panel. Switch from workspace A to B and these old rows/statuses can be acted on as if they belong to B while B's queries load. Gate workspace-scoped data by its requested key or clear it during cwd changes, and keep actions tied to the data's source cwd.