From 23e2527044b1845a26b690d6f398e1eae7d2a0d3 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 1 Nov 2026 14:59:53 -0500 Subject: [PATCH] fix: stage absolute project path in TUI silent notification handleSelectProject now stages the silent notification using the absolute projectPath ("We are working in ${projectPath}.") instead of the relative "projects/" form, so downstream path resolution (e.g. scanAgents) is not relative to a mutated process.cwd(). --- src/tui/app.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tui/app.js b/src/tui/app.js index c7686f885..38af78342 100644 --- a/src/tui/app.js +++ b/src/tui/app.js @@ -189,12 +189,10 @@ function App({ setCurrentView(PANELS.CONVERSATION); // Silently notify the agent that we're now working in the selected project. // The conversation area is unmounted during the panel view, so stage the - // message and dispatch it once it mounts. Derive the project name the same - // way the status bar does — the segment after the last "projects/". - const projectName = projectPath.includes("projects/") - ? projectPath.slice(projectPath.lastIndexOf("projects/") + "projects/".length) - : projectPath; - pendingSilentMessageRef.current = `We are working in projects/${projectName}.`; + // message and dispatch it once it mounts. Use the absolute path so the + // agent's downstream path resolution (e.g. scanAgents) is not relative to + // a mutated process.cwd(). + pendingSilentMessageRef.current = `We are working in ${projectPath}.`; }, []); /**