From c7765cf7531764c8ffe57734d797dc41b35713fb Mon Sep 17 00:00:00 2001 From: yoniebans Date: Wed, 25 Nov 2026 19:40:06 +0100 Subject: [PATCH] fix(gateway): a CLI chat on the gateway keeps its folder when desktop_project runs --- gateway/local_desktop_ui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gateway/local_desktop_ui.py b/gateway/local_desktop_ui.py index 9845fcf7a1..4de9fb76e0 100644 --- a/gateway/local_desktop_ui.py +++ b/gateway/local_desktop_ui.py @@ -186,6 +186,8 @@ def _move_workspace(task_id, path): # The chat's current folder, as its last committed move published it; a background child's own # context still holds the turn it was spawned in. policy = local_adapter_map(authority)[Platform.LOCAL].policies.get(live.source.chat_id) + if policy is not None and policy.source not in ("gui", "tui"): + return None # a CLI chat on the gateway keeps its folder: only the active project changes if policy is not None and os.path.realpath(policy.cwd) == os.path.realpath(resolved): live.pending_workspace = None # already there: an earlier call's pending move is taken back return True