mirror of
https://github.com/langgenius/dify-plugins.git
synced 2026-07-21 17:45:36 -04:00
[PR #2036] [MERGED] feat: add explicit Claude session_id resume to avoid heartbeat thread… #2040
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-plugins/pull/2036
Author: @LogicOber
Created: 2/7/2026
Status: ✅ Merged
Merged: 2/13/2026
Merged by: @crazywoola
Base:
main← Head:bump/better-e2b-sandbox-session-id📝 Commits (1)
28730f0feat: add explicit Claude session_id resume to avoid heartbeat thread hijack📊 Changes
1 file changed (+0 additions, -0 deletions)
View changed files
📝
LogicOber/better-e2b-sandbox/Better-E2B-Sandbox.difypkg(+0 -0)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.