Skip to content

fix(pulse): pass session resume inside query options for Siri turns (#2795) - #2800

Open
isihussain wants to merge 1 commit into
danielmiessler:mainfrom
isihussain:fix/siri-resume-options
Open

isihussain wants to merge 1 commit into
danielmiessler:mainfrom
isihussain:fix/siri-resume-options

Conversation

@isihussain

Copy link
Copy Markdown

Summary

Fixes #2795.

The Siri voice endpoint (LIFEOS/PULSE/modules/siri.ts) maintains an SDK session id across sequential turns within the 60-minute window, but previously set queryOpts.resume = resumeFromSdk as a sibling of options.

The Agent SDK's query() destructures { prompt, options } and reads
esume from options.resume. Because
esume sat at the top level of the argument, the id was dropped and every Siri turn was executed as an isolated fresh session.

Solution

  1. Moved
    esume into sdkOptions (...(resumeFromSdk ? { resume: resumeFromSdk } : {})).
  2. Explicitly pinned permissionMode: "default" on sdkOptions so tool gating through canUseTool remains deterministic regardless of SDK default mode changes.
  3. Removed the queryOpts object wrapper and �s never cast, calling query({ prompt: text, options: sdkOptions as never }).
  4. Added siri.resume.test.ts to test that the second Siri turn passes options.resume = "sess-1".

Signed-off-by: isihussain isihussain@users.noreply.github.com

…anielmiessler#2795)

Previously, runTurn set queryOpts.resume alongside options, but the Agent
SDK's query() destructures { prompt, options } and expects resume to be a
property of options. Consequently, the session id was dropped and every
Siri turn started a fresh session.

Move resume inside sdkOptions, set permissionMode to 'default', and remove
the queryOpts wrapper and �s never cast. Add siri.resume.test.ts to verify
session continuity across turns.

Closes danielmiessler#2795

Signed-off-by: isihussain <isihussain@users.noreply.github.com>
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.

Pulse Siri endpoint never resumes the conversation: resume is passed beside options, which query() ignores

1 participant