feat: implement SDK session ID handling for conversation continuity#90
feat: implement SDK session ID handling for conversation continuity#90webdevcody merged 6 commits intomainfrom
Conversation
SuperComboGamer
commented
Dec 14, 2025
- Added support for resuming conversations using the Claude SDK session ID.
- Updated the ClaudeProvider to conditionally resume sessions based on the presence of a session ID and conversation history.
- Enhanced the AgentService to capture and store the SDK session ID from incoming messages, ensuring continuity in conversations.
- Added support for resuming conversations using the Claude SDK session ID. - Updated the ClaudeProvider to conditionally resume sessions based on the presence of a session ID and conversation history. - Enhanced the AgentService to capture and store the SDK session ID from incoming messages, ensuring continuity in conversations.
Summary of ChangesHello @SuperComboGamer, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant feature for conversation continuity by integrating Claude SDK session ID handling. The changes allow the system to maintain the state of a conversation across multiple turns, providing a more seamless and coherent user experience. This is achieved by passing and capturing session IDs between the service layer and the Claude provider. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for conversation continuity using the Claude SDK's session ID, which is a great enhancement. The changes correctly plumb the sdkSessionId from the agent service to the Claude provider and simplify the provider logic by removing manual history management in favor of the SDK's resume feature. However, I've found a critical issue where the captured sdkSessionId is not persisted. This means conversation continuity will be lost on a server restart, defeating the main purpose of this change. My review includes a comment with a suggested fix and explanation of the necessary changes to ensure the session ID is stored and reloaded correctly.
- Renamed test case to clarify that it handles conversation history with sdkSessionId using the resume option. - Updated assertions to verify that the sdk.query method is called with the correct options when a session ID is provided.
The test "should reuse existing session if already started" expected fs.readFile to be called 1 time, but startConversation calls it 2 times on first call (loadSession + loadMetadata). The second call correctly reuses the in-memory session. Co-authored-by: GTheMachine <156854865+GTheMachine@users.noreply.github.com>
Fix test expectation for fs.readFile call count in agent-service.test.ts