feat: add explicit Claude session_id resume to avoid heartbeat thread…#2036
Open
LogicOber wants to merge 1 commit intolanggenius:mainfrom
Open
feat: add explicit Claude session_id resume to avoid heartbeat thread…#2036LogicOber wants to merge 1 commit intolanggenius:mainfrom
LogicOber wants to merge 1 commit intolanggenius:mainfrom
Conversation
7381a29 to
3894fda
Compare
3894fda to
28730f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin Submission Form
1. Metadata
https://github.com/LogicOber/dify-plugins/tree/bump/better-e2b-sandbox-session-id/LogicOber/better-e2b-sandbox2. Submission Type
3. Description
This update fixes an important Claude Code conversation continuity issue when using
Setup Sandbox Heartbeatalongside multi-turnSend Sandbox Inputconversations.Problem
Users often run multi-turn Claude Code chats via
Send Sandbox Inputwithclaude --continue. When a Heartbeat task is created in the middle, Heartbeat runs in a separate session (claude -p), but Claude Code still records it as the “most recent” session. On the next user interaction,claude --continuemay resume the Heartbeat session instead of the user’s main conversation thread, causing context loss / thread hijack.Solution: explicit Session ID mechanism
Send Sandbox Inputnow supports:capture_session_id(bool, defaultfalse): when enabled, the tool captures the current Claude Codesession_idafter execution and returns it in JSON output.session_id(string, optional): when provided, the tool usesclaude --resume <id> -pto resume the exact intended conversation thread.Command priority:
session_idis provided → use--resume <id>resume_session=true→ use--continue-p)This lets Dify workflows store and reuse the correct
session_idfor the main conversation, while Heartbeat can remain isolated without interfering.Additional changes in this update
4. Checklist
5. Documentation Checklist
6. Privacy Protection Information
Data Collection
No new user personal data collection is introduced in this update. This change only adds optional workflow parameters to control Claude Code session resuming behavior.
Privacy Policy