fix: persist queued cursors after turn completion

This commit is contained in:
ejclaw
2026-05-26 05:44:54 +09:00
parent a6e1b8172c
commit 4cd51ae3b5
3 changed files with 76 additions and 29 deletions

View File

@@ -52,11 +52,6 @@ export function finalizeQueuedRunCursor(args: {
startSeq: number | null;
endSeq: number | null;
rollbackOnSilentError: boolean;
cursorAdvanced: boolean;
previousCursor: string | undefined;
lastAgentTimestamps: Record<string, string>;
saveState: () => void;
cursorKey: string;
log: {
warn: (bindings: Record<string, unknown>, message: string) => void;
};
@@ -66,14 +61,6 @@ export function finalizeQueuedRunCursor(args: {
args.outputStatus === 'error' &&
args.visiblePhase === 'silent'
) {
if (args.cursorAdvanced) {
if (args.previousCursor === undefined) {
delete args.lastAgentTimestamps[args.cursorKey];
} else {
args.lastAgentTimestamps[args.cursorKey] = args.previousCursor;
}
args.saveState();
}
args.log.warn(
{
messageSeqStart: args.startSeq,