Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(runtime): integrate current mode instructions

vastsa3c72aedf5d67
diff --cc packages/agent-runtime/src/runtime.ts
index 0a568bf73,2b54a3517..44d065b4a
--- a/packages/agent-runtime/src/runtime.ts
+++ b/packages/agent-runtime/src/runtime.ts
@@@ -2505,10 -2538,7 +2538,10 @@@ Do not invent objections or turn specul
...(optionalToolsPrompt ? [optionalToolsPrompt] : []),
...(projectPrompt ? [projectPrompt] : []),
...(memoryPrompt ? [memoryPrompt] : []),
+ ...(this.scratchDir ? [
+ `Your scratch directory for this session is \`${formatScratchDirForShell(this.commandShell, this.scratchDir)}\` (in Bash: ${shellScratchVariable(this.commandShell)}).`,
+ ] : []),
- ].join("\n\n")),
+ ].join("\n\n"), this.modeState.instructions()),
};
const composed = Object.values(this.composedSections).filter(Boolean).join("\n\n");
this.composedSystemPrompt = composed;