Allow failed agent turns to be forked (#2063)

* fix(chat): allow failed turns to be forked

Failed turns can end in Paseo-generated timeline items without provider
message IDs. Anchor forks to canonical timeline positions while retaining
legacy boundaries for compatibility.

Place the fork summary before the new prompt and delimit it as structured
chat history.

* fix(chat): tighten fork boundary handling
This commit is contained in:
Mohamed Boudra
2026-07-15 16:30:42 +02:00
committed by GitHub
parent f06792ae89
commit 04e893417e
23 changed files with 549 additions and 108 deletions
+2
View File
@@ -538,6 +538,7 @@ function normalizeListCommandsOptions(
return { agentId: input, ...legacyOptions };
}
export interface AgentForkContextOptions {
boundaryCursor?: FetchAgentTimelineCursor;
boundaryMessageId?: string;
requestId?: string;
}
@@ -2555,6 +2556,7 @@ export class DaemonClient {
type: "agent.fork_context.request",
agentId,
requestId: resolvedRequestId,
...(options.boundaryCursor ? { boundaryCursor: options.boundaryCursor } : {}),
...(options.boundaryMessageId ? { boundaryMessageId: options.boundaryMessageId } : {}),
});