Repository navigation
Show Agent-tool subagents in the Agents panel - #23
Merged
currentbits merged 1 commit intoAug 14, 2026
Merged
Conversation
The panel only listed threads Solenta itself creates, so subagents spawned inside a Claude Code session (Agent tool) were invisible (issue #21). The CLI runs them internally; the only trace is its stream. Track them there: - tool_use named Agent/Task registers a row on the thread record (description, subagent_type, running), capped to the newest 20 - a sync agent's tool_result settles it done/failed; a background launch ack ("Async agent launched") keeps it running - a <task-notification> pairs back via <tool-use-id> and settles the background agent — scanned before the run guard, since notifications can land between turns on a kept-alive CLI - CLI death (idle reap, param change, delete, quit) settles any still-running rows so a dead agent never shows a live badge Rows flow to the renderer on the existing thread:updated push; the Agents tab renders a Subagents section reusing TeamRow, with the agent type in the provider slot. Closes #21 Co-Authored-By: Claude Fable 5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
currentbits
deleted the
coder/research-agents-background-subagents-not-0c68c3
branch
October 3, 2026 16:07
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.
Fixes #21.
Problem
The Agents panel only lists threads Solenta itself creates in its store. Subagents spawned inside a Claude Code session via the Agent tool live entirely in the CLI process — the panel never saw them.
Approach
The CLI's stream is the only trace of a subagent, so the runner tracks their lifecycle there and stores rows on the thread record (
thread.subagents, keyed by tool_use id, capped to the newest 20):tool_usenamedAgent(orTaskin older CLIs) registers a row as running, with the call'sdescriptionandsubagent_type.tool_resultsettles it done (or failed onis_error). A background launch ack ("Async agent launched") keeps it running.<task-notification>pairs back to the spawning call via<tool-use-id>and settles the background agent. Notifications can land between turns on a kept-alive CLI, so they're scanned before the active-run guard inonEvent.Rows reach the renderer on the existing
thread:updatedpush (getThreadDetailreturns the raw thread record — no new IPC). The Agents tab renders a Subagents section in all non-workflow views, reusingTeamRowwith the agent type in the provider slot. Done rows stay listed (per the issue's expectation), unlike orchestration workers which drop out — subagent rows are bounded per thread.Tests
electron/test/claude.test.js: newsubagentsfake-CLI scenario — asserts sync→done, background stays running after its launch ack, task-notification settles it, and rows reachthread:updated.test/teamView.test.tsx: panel renders the Subagents section with status badges and agent type.npm run test:electronandnpm run test:rendererpass at the same counts as the clean baseline (pre-existing flakes/failures: two-turn spawn race in fork-handoff/claude resume, orch-server env failures, memory-wiring scope test);tsc --noEmitclean.🤖 Generated with Claude Code