Skip to content

fix: ask resume-session a question about the saved conversation - #86

Merged
factory-davidgu merged 1 commit into
mainfrom
droid/resume-session-prompt
Nov 28, 2026
Merged

factory-davidgu merged 1 commit into
mainfrom
droid/resume-session-prompt

Conversation

@factory-droid

@factory-droid factory-droid Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Description

What: examples/node/resume-session.ts now asks the resumed session "In one sentence, what did I ask you to do earlier in this conversation?" instead of "Continue from the last conversation." A comment explains why. The harness checks are unchanged.

Why: resume-session failed the scheduled Examples run on Nov 13, 16 and 17, and needed a retry on Nov 27 (macOS). Each failure ends with Turn ended: interrupted.

Root cause: The saved session's only earlier turn is "reply Metadata OK", so "continue" leaves Droid nothing to do. Droid often searches past sessions and the project, then calls AskUser to ask what to do next. resumeSession() is called without an askUserHandler, so the SDK cancels the question, which ends the turn as interrupted. I checked the transcripts of 11 failing local runs, and all 11 ended in a cancelled AskUser.

The new prompt has a definite answer in the resumed conversation, so Droid answers directly. The answer also shows that the saved context carried over ("You asked me to reply with "Metadata OK" and nothing else.").

This is separate from #85, which fixes the same kind of interruption in the spec-mode examples. Neither PR depends on the other.

Validation

  • npm test (14/14), npm run typecheck, npm run lint, npm run format:check, npm run check:docs: all pass.
  • node scripts/run-examples.mjs --only resume-session --runs 16 --retries 0, droid 1.21.1, Linux:
Pass Mean credits per run
Before (main) 5/16 13,875
After (this branch) 16/16 2,553

No new unit test: npm test makes no model calls. The live harness with --retries 0 is the check that fails without this change (5/16 above).

"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>
@factory-davidgu
factory-davidgu merged commit e0da5fa into main Nov 28, 2026
7 of 8 checks passed
@factory-davidgu
factory-davidgu deleted the droid/resume-session-prompt branch November 28, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant