From c0e42ea26d357958cddcfbf2f68c480cae309e0a Mon Sep 17 00:00:00 2001 From: "Factory: remote-delegations" <138933559+factory-droid[bot]@users.noreply.github.com> Date: Fri, 27 Nov 2026 07:07:16 +0000 Subject: [PATCH] fix: ask resume-session a question about the saved conversation "Continue from the last conversation." left Droid nothing to do after a one-line earlier turn, so it often searched past sessions and then asked the user what to do next. The example sets no askUserHandler, so the SDK cancelled the question and the turn ended as interrupted. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- examples/node/resume-session.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/node/resume-session.ts b/examples/node/resume-session.ts index 4cdfd07..227ff5a 100644 --- a/examples/node/resume-session.ts +++ b/examples/node/resume-session.ts @@ -21,9 +21,13 @@ try { console.log(`cwd: ${String(session.cwd)}`); console.log(`model: ${session.settings.modelId}`); + // Ask about the saved conversation so the answer shows its context carried + // over. An open-ended "continue" leaves Droid nothing to do, so it may ask + // the user what to do next. Without an askUserHandler the SDK cancels that + // question, which ends the turn as interrupted. let assistantText = ''; for await (const message of session.stream( - 'Continue from the last conversation.' + 'In one sentence, what did I ask you to do earlier in this conversation?' )) { if (message.type === DroidMessageType.Assistant) { assistantText += message.text;