detached 0dca9c4

fix(agent): mention stopping worktree workers only when stop is available

commit
0dca9c40e2c7be05bae4a1e6ae15a11a12154cb3
author
brice · · 2026-10-18 18:04 UTC
parent
dd4a900
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +2 -3
M packages/agent/settings_store.go +1 -2
@@ -305,7 +305,6 @@ Plan parallelism before spawning:
305305
306306 Clean up as soon as a worker's result is integrated:
307307 - Remove merged sub-worktrees and their branches with the worktree tool's cleanup action, setting into to the feature branch and delete_branch to true.
308-- Stop idle isolation:"worktree" workers once their patch is applied so their temporary worktree is removed.
309308 - Before your final answer, check with the worktree tool's list action that no worktree you created is left behind unless the user should keep it.
310309
311310 When you delegate:
@@ -375,7 +374,7 @@ func subagentsSystemAddendumFor(base, unavailable string, strict bool, actions S
375374 lifecycle = append(lifecycle, "use interrupt to cancel only a worker's running turn while keeping its context, for example before asking it to wrap up")
376375 }
377376 if actions.Stop {
378- lifecycle = append(lifecycle, "use stop to request termination of a stuck worker")
377+ lifecycle = append(lifecycle, "use stop to request termination of a stuck worker, and to remove an idle isolation:\"worktree\" worker's temporary worktree once its patch is applied")
379378 }
380379 if len(lifecycle) != 0 {
381380 addendum += "\n\nSubagent manager lifecycle actions available: " + strings.Join(lifecycle, "; ") + "."
@@ -305,7 +305,6 @@ Plan parallelism before spawning:
305 305
306 Clean up as soon as a worker's result is integrated:306 Clean up as soon as a worker's result is integrated:
307 - Remove merged sub-worktrees and their branches with the worktree tool's cleanup action, setting into to the feature branch and delete_branch to true.307 - Remove merged sub-worktrees and their branches with the worktree tool's cleanup action, setting into to the feature branch and delete_branch to true.
308-- Stop idle isolation:"worktree" workers once their patch is applied so their temporary worktree is removed.
309 - Before your final answer, check with the worktree tool's list action that no worktree you created is left behind unless the user should keep it.308 - Before your final answer, check with the worktree tool's list action that no worktree you created is left behind unless the user should keep it.
310 309
311 When you delegate:310 When you delegate:
@@ -375,7 +374,7 @@ func subagentsSystemAddendumFor(base, unavailable string, strict bool, actions S
375 lifecycle = append(lifecycle, "use interrupt to cancel only a worker's running turn while keeping its context, for example before asking it to wrap up")374 lifecycle = append(lifecycle, "use interrupt to cancel only a worker's running turn while keeping its context, for example before asking it to wrap up")
376 }375 }
377 if actions.Stop {376 if actions.Stop {
378- lifecycle = append(lifecycle, "use stop to request termination of a stuck worker")377+ lifecycle = append(lifecycle, "use stop to request termination of a stuck worker, and to remove an idle isolation:\"worktree\" worker's temporary worktree once its patch is applied")
379 }378 }
380 if len(lifecycle) != 0 {379 if len(lifecycle) != 0 {
381 addendum += "\n\nSubagent manager lifecycle actions available: " + strings.Join(lifecycle, "; ") + "."380 addendum += "\n\nSubagent manager lifecycle actions available: " + strings.Join(lifecycle, "; ") + "."
M packages/agent/settings_store_test.go +1 -1
@@ -8,7 +8,7 @@ import (
88 func TestSubagentsSystemAddendaListOnlyEnabledLifecycleTools(t *testing.T) {
99 // Substrings that identify the lifecycle action guidance.
1010 const (
11- stopAction = "use stop to request termination of a stuck worker"
11+ stopAction = "use stop to request termination of a stuck worker, and to remove an idle isolation:\"worktree\" worker's temporary worktree"
1212 resumeAction = "use resume with an agent id and follow-up prompt"
1313 interruptAction = "use interrupt to cancel only a worker's running turn"
1414 noSpawnNotice = "Spawning new workers is unavailable"
@@ -8,7 +8,7 @@ import (
8 func TestSubagentsSystemAddendaListOnlyEnabledLifecycleTools(t *testing.T) {8 func TestSubagentsSystemAddendaListOnlyEnabledLifecycleTools(t *testing.T) {
9 // Substrings that identify the lifecycle action guidance.9 // Substrings that identify the lifecycle action guidance.
10 const (10 const (
11- stopAction = "use stop to request termination of a stuck worker"11+ stopAction = "use stop to request termination of a stuck worker, and to remove an idle isolation:\"worktree\" worker's temporary worktree"
12 resumeAction = "use resume with an agent id and follow-up prompt"12 resumeAction = "use resume with an agent id and follow-up prompt"
13 interruptAction = "use interrupt to cancel only a worker's running turn"13 interruptAction = "use interrupt to cancel only a worker's running turn"
14 noSpawnNotice = "Spawning new workers is unavailable"14 noSpawnNotice = "Spawning new workers is unavailable"

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close