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

@@ -26,6 +26,7 @@
- MIME sniffing and redirect handling for downloads/hosted media.
- Response prefix applied to heartbeat alerts; heartbeat array payloads handled for both providers.
- Tau RPC typing exposes `signal`/`killed`; NDJSON parsers normalized across agents.
- Tau (pi) session resumes now append `--continue`, so existing history/think level are reloaded instead of starting empty.
### Testing
- Fixtures isolate session stores; added coverage for thinking directives, stateful levels, heartbeat backpressure, and agent parsing.

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 =