You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subagent status rows in the composer status stack have no dismiss (X) button after completing, failing, or timing out. Only background type rows get the close affordance — subagent items always return null from the action selector, leaving finished cards permanently stuck in the UI until the app is restarted.
Root Cause
In status-row.tsx, the action variable only checks for item.type === background:
Summary:
Every subagent row renders with a hardcoded state: 'running' (subToItem, composer-status.ts:136), so the new Dismiss branch is unreachable and the Stop branch sends the subagent id to process.kill, which resolves against the background-process registry and returns 4044 — the row stays and an error surfaces.
Problems:
subToItem (composer-status.ts:136) sets state: 'running' on every subagent row, and the stack computed only pushes running/queued subagents (composer-status.ts:212), so in status-row.tsx the running ? onStop : onDismiss ternary always selects the Stop branch for subagent rows; the new dismissSubagent path wired in index.tsx never renders.
The Stop button that does render calls stopBackgroundProcess → process.kill with the subagent's id (composer-status.ts:412). process.kill resolves process_registry.get(proc_id) (tui_gateway/methods_tools.py:74) and returns 4044 "no such process" when the lookup misses (methods_tools.py:78); stopBackgroundProcess then notifies "Could not stop the process" and only dismisses on a confirmed kill (composer-status.ts:410-418). Net effect: error toast, row stays.
Solution:
Carry the real subagent status into the row state so the Dismiss branch is reachable, and do not send subagent ids to process.kill — subagent rows are keyed by subagent id from subagent.* events, not by process.list entries; the desktop's existing stop path for subagent-bearing turns is session-level (clearSessionSubagents + session.interrupt, use-prompt-actions/index.ts:619-630). The stuck-row symptom itself is the status normalization in #73728/#73859.
Checked against aa9e551 — the tip of fix/subagent-dismiss-button when this was written — and 55505be, main at the same moment.
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
comp/desktopElectron desktop app (apps/desktop/*)P3Low — cosmetic, nice to havetype/bugSomething isn't working
3 participants
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
Subagent status rows in the composer status stack have no dismiss (X) button after completing, failing, or timing out. Only
backgroundtype rows get the close affordance —subagentitems always returnnullfrom the action selector, leaving finished cards permanently stuck in the UI until the app is restarted.Root Cause
In
status-row.tsx, theactionvariable only checks foritem.type === background:The
onDismisscallback is passed from the parent for all item types, but subagent items never use it.Fix (3 files, +23/-2 lines)
1.
status-row.tsx— extend action condition2.
subagents.ts— adddismissSubagent()New function that removes a single subagent by ID from
$subagentsBySession, paralleling the existingdismissBackgroundProcessfor background items.3.
index.tsx— dispatch to correct storeBehavior
runningcompleted/failed/interrupted/timeoutVerification
tsc --noEmit, 0 errors)npm run build)