Repository navigation
fix(subagents): surface worktree cleanup failures - #258
Merged
somewan820 merged 4 commits intoAug 29, 2026
Merged
Conversation
Contributor
Author
|
行为复核更新(2026-08-29):发现并修复一个真实漏报路径。worktree 已删除但子代理在自己的分支上产生了提交时,清理结果可能是 本地验证:
修复已同步到 PR #258,最新提交 |
Contributor
Author
|
最终验证:最新提交 |
627150795
force-pushed
the
fix/issue-73-worktree-cleanup
branch
from
August 29, 2026 05:01
6cbfc92 to
fec084b
Compare
Contributor
Author
|
代码审计补丁已追加到本 PR:
|
7 tasks
somewan820
approved these changes
Aug 29, 2026
somewan820
left a comment
Collaborator
There was a problem hiding this comment.
已完成静态审查。cleanup failure/warning 会保留原始 spawn error 的 cause,并明确指出 preserved checkout 或残留 branch;formatWorktreeCleanupWarning 有实际调用和覆盖测试。未发现 P0-P2 或死代码问题。P3:建议后续补充真实 spawn failure 与跨平台 git 输出的集成覆盖。未运行测试。
somewan820
force-pushed
the
fix/issue-73-worktree-cleanup
branch
from
August 29, 2026 12:35
fec084b to
b386a7a
Compare
agnitum2009
pushed a commit
to agnitum2009/openpi
that referenced
this pull request
Aug 29, 2026
* fix(subagents): surface worktree cleanup failures * fix(worktree): report retained branches without reason * style(subagents): terminate index file * fix(worktree): avoid claiming unknown checkouts remain (cherry picked from commit 6c43f92)
7 tasks
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.
Problem
When a Subagent spawn aborts after creating an isolated worktree, cleanup failures were swallowed. The user could see the original spawn error but not that a checkout or branch remained for recovery.
Value
A failed spawn now preserves the original error while exposing the cleanup warning or failure and the recovery location. This prevents orphaned work from becoming silent state.
Approach
Format every incomplete WorktreeCleanup result into a visible warning, including a retained branch when no textual cleanup reason is available; report thrown cleanup failures without hiding the spawn error; and add focused tests for preserved checkouts, leftover branches, and complete cleanup. The change covers only this cleanup-observability slice of #73.
Validation
Impact
Part of #73