Pi: resume Tau sessions with --continue

This commit is contained in:
Peter Steinberger
2025-12-03 11:33:51 +00:00
parent 8220b11770
commit cc596ef011
2 changed files with 8 additions and 0 deletions

View File

@@ -267,6 +267,13 @@ export async function runCommandReply(
? (reply.session.sessionArgNew ?? defaultNew)
: (reply.session.sessionArgResume ?? defaultResume)
).map((p) => applyTemplate(p, templatingCtx));
// Tau (pi agent) needs --continue to reload prior messages when resuming.
// Without it, pi starts from a blank state even though we pass the session file path.
if (agentKind === "pi" && !isNewSession && !sessionArgList.includes("--continue")) {
sessionArgList.push("--continue");
}
if (sessionArgList.length) {
const insertBeforeBody = reply.session.sessionArgBeforeBody ?? true;
const insertAt =