修复 subagent 会话归属与后台任务隔离#4215
Closed
lifu963 wants to merge 10 commits into
Closed
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
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.
背景
本 PR 修复 subagent transcript 与后台 jobs 的 session ownership 问题:Desktop 下 subagent 可能写到全局 session 目录,后台 job 也没有严格按 parent session 隔离,导致新建/删除/恢复会话时存在输出泄漏或 late writeback 风险。
变更内容
SubagentStore的 effectiveSessionDir,Desktop 下 subagent transcript 跟随 workspace session 目录;CLI 默认行为不变。wait、bash_output、kill_shell、status bar、完成摘要和 lifecycle notice。subagents/。Controller.Run路径的 job session 注入,使 headless / 直接调用路径与交互式 turn 一致。验证
gofmt -l .(root module,排除desktop/)无输出gofmt -l .(desktop/module)无输出go vet ./...(root module /desktop/module)go test ./...(root module /desktop/module)git merge-tree --write-tree HEAD origin/main-v2通过